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

feat: note update federation #1

Merged
merged 5 commits into from
Aug 19, 2024
Merged

feat: note update federation #1

merged 5 commits into from
Aug 19, 2024

Conversation

caipira113
Copy link

@caipira113 caipira113 commented Dec 27, 2023

None

Copy link

github-actions bot commented Dec 27, 2023

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

差分はこちら
--- base
+++ head
@@ -55760,6 +55760,281 @@
         }
       }
     },
+    "/notes/update": {
+      "post": {
+        "operationId": "notes___update",
+        "summary": "notes/update",
+        "description": "No description provided.\n\n**Credential required**: *Yes* / **Permission**: *write:notes*",
+        "externalDocs": {
+          "description": "Source code",
+          "url": "https://github.com/misskey-dev/misskey/blob/develop/packages/backend/src/server/api/endpoints/notes/update.ts"
+        },
+        "tags": [
+          "notes"
+        ],
+        "security": [
+          {
+            "bearerAuth": []
+          }
+        ],
+        "requestBody": {
+          "required": true,
+          "content": {
+            "application/json": {
+              "schema": {
+                "type": "object",
+                "properties": {
+                  "noteId": {
+                    "type": "string",
+                    "format": "misskey:id"
+                  },
+                  "text": {
+                    "type": [
+                      "string",
+                      "null"
+                    ],
+                    "minLength": 1,
+                    "maxLength": 3000
+                  },
+                  "fileIds": {
+                    "type": "array",
+                    "uniqueItems": true,
+                    "minItems": 1,
+                    "maxItems": 16,
+                    "items": {
+                      "type": "string",
+                      "format": "misskey:id"
+                    }
+                  },
+                  "mediaIds": {
+                    "type": "array",
+                    "uniqueItems": true,
+                    "minItems": 1,
+                    "maxItems": 16,
+                    "items": {
+                      "type": "string",
+                      "format": "misskey:id"
+                    }
+                  },
+                  "poll": {
+                    "type": [
+                      "object",
+                      "null"
+                    ],
+                    "properties": {
+                      "choices": {
+                        "type": "array",
+                        "uniqueItems": true,
+                        "minItems": 2,
+                        "maxItems": 10,
+                        "items": {
+                          "type": "string",
+                          "minLength": 1,
+                          "maxLength": 50
+                        }
+                      },
+                      "multiple": {
+                        "type": "boolean"
+                      },
+                      "expiresAt": {
+                        "type": [
+                          "integer",
+                          "null"
+                        ]
+                      },
+                      "expiredAfter": {
+                        "type": [
+                          "integer",
+                          "null"
+                        ],
+                        "minimum": 1
+                      }
+                    },
+                    "required": [
+                      "choices"
+                    ]
+                  },
+                  "cw": {
+                    "type": [
+                      "string",
+                      "null"
+                    ],
+                    "maxLength": 100
+                  },
+                  "disableRightClick": {
+                    "type": "boolean",
+                    "default": false
+                  }
+                },
+                "required": [
+                  "noteId",
+                  "text",
+                  "cw"
+                ]
+              }
+            }
+          }
+        },
+        "responses": {
+          "204": {
+            "description": "OK (without any results)"
+          },
+          "400": {
+            "description": "Client error",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                },
+                "examples": {
+                  "NO_SUCH_NOTE": {
+                    "value": {
+                      "error": {
+                        "message": "No such note.",
+                        "code": "NO_SUCH_NOTE",
+                        "id": "a6584e14-6e01-4ad3-b566-851e7bf0d474"
+                      }
+                    }
+                  },
+                  "NO_SUCH_FILE": {
+                    "value": {
+                      "error": {
+                        "message": "Some files are not found.",
+                        "code": "NO_SUCH_FILE",
+                        "id": "b6992544-63e7-67f0-fa7f-32444b1b5306"
+                      }
+                    }
+                  },
+                  "CANNOT_CREATE_ALREADY_EXPIRED_POLL": {
+                    "value": {
+                      "error": {
+                        "message": "Poll is already expired.",
+                        "code": "CANNOT_CREATE_ALREADY_EXPIRED_POLL",
+                        "id": "04da457d-b083-4055-9082-955525eda5a5"
+                      }
+                    }
+                  },
+                  "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"
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          },
+          "429": {
+            "description": "To many requests",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                },
+                "examples": {
+                  "RATE_LIMIT_EXCEEDED": {
+                    "value": {
+                      "error": {
+                        "message": "Rate limit exceeded. Please try again later.",
+                        "code": "RATE_LIMIT_EXCEEDED",
+                        "id": "d5826d14-3982-4d2e-8011-b9e9f02499ef"
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          },
+          "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/delete": {
       "post": {
         "operationId": "notes___delete",
@@ -77708,6 +77983,13 @@
             "type": "string",
             "format": "date-time"
           },
+          "updatedAt": {
+            "type": [
+              "string",
+              "null"
+            ],
+            "format": "date-time"
+          },
           "deletedAt": {
             "type": [
               "string",
@@ -80361,6 +80643,12 @@
           "canPublicNote": {
             "type": "boolean"
           },
+          "canEditNote": {
+            "type": [
+              "boolean",
+              "null"
+            ]
+          },
           "mentionLimit": {
             "type": "integer"
           },
@@ -80435,6 +80723,7 @@
           "gtlAvailable",
           "ltlAvailable",
           "canPublicNote",
+          "canEditNote",
           "mentionLimit",
           "canInvite",
           "inviteLimit",

Get diff files from Workflow Page

caipira113 pushed a commit that referenced this pull request Dec 27, 2023
Copy link
Author

@caipira113 caipira113 left a comment

Choose a reason for hiding this comment

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

renamed!

packages/backend/migration/1703693004255-poll_vote_poll.js Outdated Show resolved Hide resolved
@caipira113 caipira113 changed the title feat: federated note edit feat(backend): note update federation Aug 19, 2024
@caipira113 caipira113 changed the title feat(backend): note update federation feat: note update federation Aug 19, 2024
@caipira113 caipira113 marked this pull request as ready for review August 19, 2024 18:29
@caipira113 caipira113 merged commit 4208bf0 into develop Aug 19, 2024
28 of 29 checks passed
@caipira113 caipira113 deleted the updateable-note branch August 19, 2024 18:30
caipira113 added a commit that referenced this pull request Aug 20, 2024
yunochi pushed a commit to serafuku/misskey that referenced this pull request Aug 26, 2024
jbblily pushed a commit to jbblily/misskey that referenced this pull request Aug 30, 2024
yunochi pushed a commit to serafuku/misskey that referenced this pull request Sep 30, 2024
yunochi pushed a commit to serafuku/misskey that referenced this pull request Oct 13, 2024
yunochi pushed a commit to serafuku/misskey that referenced this pull request Oct 16, 2024
yunochi pushed a commit to serafuku/misskey that referenced this pull request Oct 30, 2024
libnare#1

ellelle

- fix: When updating Note, emojis are not reflected through Streaming
- fix: prevent note federation for localOnly
yunochi added a commit to serafuku/misskey that referenced this pull request Oct 30, 2024
Cherry pick commits from: libnare#1
- ellelle
- fix: When updating Note, emojis are not reflected through Streaming
- fix: prevent note federation for localOnly

Serafuku commits:
- Note update 기능 수정
- Log 수정
- API리밋 수정
- 노트 상세보기 화면에서도 수정시간이 보이도록
- fix lint

Co-authored-by: caipira113 <[email protected]>
HotoRas added a commit to HotoRas/misskey-neko that referenced this pull request Nov 19, 2024
cherry-pick:
7bf8775

======================

Cherry pick commits from: libnare#1
- ellelle
- fix: When updating Note, emojis are not reflected through Streaming
- fix: prevent note federation for localOnly

Serafuku commits:
- Note update 기능 수정
- Log 수정
- API리밋 수정
- 노트 상세보기 화면에서도 수정시간이 보이도록
- fix lint

Co-authored-by: caipira113 <[email protected]>
yunochi added a commit to serafuku/misskey that referenced this pull request Nov 23, 2024
Cherry pick commits from: libnare#1
- ellelle
- fix: When updating Note, emojis are not reflected through Streaming
- fix: prevent note federation for localOnly

Serafuku commits:
- Note update 기능 수정
- Log 수정
- API리밋 수정
- 노트 상세보기 화면에서도 수정시간이 보이도록
- fix lint

Co-authored-by: caipira113 <[email protected]>
LilyMorpho pushed a commit to LilyMorpho/misskey_cremebrulee that referenced this pull request Dec 27, 2024
Cherry pick commits from: libnare#1
- ellelle
- fix: When updating Note, emojis are not reflected through Streaming
- fix: prevent note federation for localOnly

Serafuku commits:
- Note update 기능 수정
- Log 수정
- API리밋 수정
- 노트 상세보기 화면에서도 수정시간이 보이도록
- fix lint

Co-authored-by: caipira113 <[email protected]>
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.

1 participant