Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix messages search #339

Merged
merged 19 commits into from
Aug 28, 2024
Merged

Conversation

kozakura913
Copy link
Collaborator

#111

Checklist

  • コントリビューションガイドを読みました( Read the contribution guide)
  • ローカル環境で動作しました(Test working in a local environment)
  • (必要なら)CHANGELOG_YOJO.mdの更新((If needed) Update CHANGELOG_YOJO.md)
  • (必要なら)テストの追加((If possible) Add tests)

@kozakura913
Copy link
Collaborator Author

ローカル環境で動作しませんでした

Copy link
Contributor

github-actions bot commented Aug 15, 2024

이 PR에 의한 api.json 차이

차이점은 여기에서 볼 수 있음
--- base
+++ head
@@ -54081,6 +54081,203 @@
         }
       }
     },
+    "/messaging/messages/search": {
+      "post": {
+        "operationId": "messaging___messages___search",
+        "summary": "messaging/messages/search",
+        "description": "No description provided.\n\n**Credential required**: *Yes* / **Permission**: *read:messaging*",
+        "externalDocs": {
+          "description": "Source code",
+          "url": "https://github.com/kokonect-link/cherrypick/blob/develop/packages/backend/src/server/api/endpoints/messaging/messages/search.ts"
+        },
+        "tags": [
+          "messaging"
+        ],
+        "security": [
+          {
+            "bearerAuth": []
+          }
+        ],
+        "requestBody": {
+          "required": true,
+          "content": {
+            "application/json": {
+              "schema": {
+                "type": "object",
+                "properties": {
+                  "query": {
+                    "type": "string"
+                  },
+                  "sinceId": {
+                    "type": "string",
+                    "format": "misskey:id"
+                  },
+                  "untilId": {
+                    "type": "string",
+                    "format": "misskey:id"
+                  },
+                  "limit": {
+                    "type": "integer",
+                    "minimum": 1,
+                    "maximum": 100,
+                    "default": 10
+                  },
+                  "recipientId": {
+                    "type": [
+                      "string",
+                      "null"
+                    ],
+                    "format": "misskey:id",
+                    "default": null
+                  },
+                  "groupId": {
+                    "type": [
+                      "string",
+                      "null"
+                    ],
+                    "format": "misskey:id",
+                    "default": null
+                  }
+                },
+                "required": [
+                  "query"
+                ]
+              }
+            }
+          }
+        },
+        "responses": {
+          "200": {
+            "description": "OK (with results)",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "type": "array",
+                  "items": {
+                    "type": "object",
+                    "$ref": "#/components/schemas/MessagingMessage"
+                  }
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Client error",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                },
+                "examples": {
+                  "UNAVAILABLE": {
+                    "value": {
+                      "error": {
+                        "message": "Search of direct messages is ",
+                        "code": "UNAVAILABLE",
+                        "id": "5e086500-f40e-11ee-90b4-00155d403610"
+                      }
+                    }
+                  },
+                  "INVALID_PARAM": {
+                    "value": {
+                      "error": {
+                        "message": "Invalid param.",
+                        "code": "INVALID_PARAM",
+                        "id": "3d81ceae-475f-4600-b2a8-2bc116157532"
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Authentication error",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                },
+                "examples": {
+                  "CREDENTIAL_REQUIRED": {
+                    "value": {
+                      "error": {
+                        "message": "Credential required.",
+                        "code": "CREDENTIAL_REQUIRED",
+                        "id": "1384574d-a912-4b81-8601-c7b1c4085df1"
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Forbidden error",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                },
+                "examples": {
+                  "AUTHENTICATION_FAILED": {
+                    "value": {
+                      "error": {
+                        "message": "Authentication failed. Please ensure your token is correct.",
+                        "code": "AUTHENTICATION_FAILED",
+                        "id": "b0a7f5f8-dc2f-4171-b91f-de88ad238e14"
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          },
+          "418": {
+            "description": "I'm Ai",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                },
+                "examples": {
+                  "I_AM_AI": {
+                    "value": {
+                      "error": {
+                        "message": "You sent a request to Ai-chan, CherryPick's showgirl, instead of the server.",
+                        "code": "I_AM_AI",
+                        "id": "60c46cd1-f23a-46b1-bebe-5d2b73951a84"
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          },
+          "500": {
+            "description": "Internal server error",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                },
+                "examples": {
+                  "INTERNAL_ERROR": {
+                    "value": {
+                      "error": {
+                        "message": "Internal error occurred. Please contact us if the error persists.",
+                        "code": "INTERNAL_ERROR",
+                        "id": "5d37dbcb-891e-41ca-a3d6-e690c97775ac"
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          }
+        }
+      }
+    },
     "/meta": {
       "post": {
         "operationId": "meta",

Get diff files from Workflow Page

Copy link

codecov bot commented Aug 15, 2024

Codecov Report

Attention: Patch coverage is 60.29412% with 27 lines in your changes missing coverage. Please review.

Project coverage is 40.52%. Comparing base (75c18c9) to head (39d93c3).
Report is 15 commits behind head on develop.

Files Patch % Lines
...ges/backend/src/core/DirectMessageSearchService.ts 34.78% 15 Missing ⚠️
...src/core/entities/MessagingMessageEntityService.ts 7.69% 12 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #339      +/-   ##
===========================================
+ Coverage    36.83%   40.52%   +3.69%     
===========================================
  Files         1655     1660       +5     
  Lines       215918   222730    +6812     
  Branches      2696     3725    +1029     
===========================================
+ Hits         79527    90257   +10730     
+ Misses      135742   131865    -3877     
+ Partials       649      608      -41     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

sonarcloud bot commented Aug 16, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
18.4% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@penginn-net
Copy link
Collaborator

#111

@kozakura913 kozakura913 marked this pull request as ready for review August 22, 2024 11:49
@kozakura913 kozakura913 added this to the yojo0.6.0 milestone Aug 23, 2024
@penginn-net
Copy link
Collaborator

レビュワー募集

Copy link
Collaborator

@penginn-net penginn-net left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

動いてるからヨシ👈!!!

@penginn-net
Copy link
Collaborator

本当に?

@kozakura913 kozakura913 merged commit 4fe3dc8 into yojo-art:develop Aug 28, 2024
27 of 28 checks passed
@kozakura913 kozakura913 deleted the fix_messages_search branch August 28, 2024 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants