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

virtual kemomimi relay timeline #174

Merged
merged 14 commits into from
Apr 12, 2024

Conversation

anatawa12
Copy link
Collaborator

What

Fixes #57

Why

  • めっちゃ需要がある。
  • GTLが速すぎる

Additional info (optional)

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Add story of storybook
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests

Copy link

github-actions bot commented Apr 11, 2024

このPRによるapi.jsonの差分

差分はこちら
--- base
+++ head
@@ -55229,6 +55229,194 @@
         }
       }
     },
+    "/notes/vmimi-relay-timeline": {
+      "post": {
+        "operationId": "notes/vmimi-relay-timeline",
+        "summary": "notes/vmimi-relay-timeline",
+        "description": "No description provided.\n\n**Credential required**: *No*",
+        "externalDocs": {
+          "description": "Source code",
+          "url": "https://github.com/misskey-dev/misskey/blob/develop/packages/backend/src/server/api/endpoints/notes/vmimi-relay-timeline.ts"
+        },
+        "tags": [
+          "notes"
+        ],
+        "requestBody": {
+          "required": true,
+          "content": {
+            "application/json": {
+              "schema": {
+                "type": "object",
+                "properties": {
+                  "withFiles": {
+                    "type": "boolean",
+                    "default": false
+                  },
+                  "withRenotes": {
+                    "type": "boolean",
+                    "default": true
+                  },
+                  "withReplies": {
+                    "type": "boolean",
+                    "default": false
+                  },
+                  "limit": {
+                    "type": "integer",
+                    "minimum": 1,
+                    "maximum": 100,
+                    "default": 10
+                  },
+                  "sinceId": {
+                    "type": "string",
+                    "format": "misskey:id"
+                  },
+                  "untilId": {
+                    "type": "string",
+                    "format": "misskey:id"
+                  },
+                  "sinceDate": {
+                    "type": "integer"
+                  },
+                  "untilDate": {
+                    "type": "integer"
+                  }
+                }
+              }
+            }
+          }
+        },
+        "responses": {
+          "200": {
+            "description": "OK (with results)",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "type": "array",
+                  "items": {
+                    "type": "object",
+                    "$ref": "#/components/schemas/Note"
+                  }
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Client error",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                },
+                "examples": {
+                  "GTL_DISABLED": {
+                    "value": {
+                      "error": {
+                        "message": "Global timeline has been disabled.",
+                        "code": "GTL_DISABLED",
+                        "id": "0332fc13-6ab2-4427-ae80-a9fadffd1a6b"
+                      }
+                    }
+                  },
+                  "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, Misskey'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"
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          }
+        }
+      }
+    },
     "/notes/hybrid-timeline": {
       "post": {
         "operationId": "notes/hybrid-timeline",

Get diff files from Workflow Page

@anatawa12 anatawa12 force-pushed the vmimi-relay-timeline branch from 28de4e9 to aecac19 Compare April 11, 2024 11:02
@anatawa12
Copy link
Collaborator Author

別サーバーにも投げるつもりなので、update branchはいろいろ仕様を直してからやります。

locales/ja-JP.yml Outdated Show resolved Hide resolved
@anatawa12
Copy link
Collaborator Author

CIエラーはCI側の問題だったわ

@anatawa12 anatawa12 closed this Apr 11, 2024
@anatawa12 anatawa12 reopened this Apr 11, 2024
// 流れてきたNoteがブロックされているユーザーが関わるものだったら無視する
if (isUserRelated(note, this.userIdsWhoBlockingMe)) return;

if (note.renote && !note.text && isUserRelated(note, this.userIdsWhoMeMutingRenotes)) return;

Choose a reason for hiding this comment

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

これ多分コピペだと思うんですけど、手前のリノート判定に比べて、ファイルの有無が無くて引用判定のチェックが甘い…?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

たしかに。

ここら、utilsにまとめるリファクタ本家で後でやるつもりがあるので取り敢えず今はこのままにします。

Choose a reason for hiding this comment

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

OK!

Copy link

@Sayamame-beans Sayamame-beans left a comment

Choose a reason for hiding this comment

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

might be ok!

CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Sayamame-beans <[email protected]>
@anatawa12 anatawa12 merged commit 8e6f4f7 into niri-la:develop Apr 12, 2024
22 checks passed
@anatawa12 anatawa12 deleted the vmimi-relay-timeline branch April 12, 2024 11:11
@anatawa12
Copy link
Collaborator Author

Note: reimplemented and social is added in #176

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