diff --git a/packages/backend/src/server/api/endpoints/notes/update.ts b/packages/backend/src/server/api/endpoints/notes/update.ts index 9af98ffa83..6bc0e3d7f9 100644 --- a/packages/backend/src/server/api/endpoints/notes/update.ts +++ b/packages/backend/src/server/api/endpoints/notes/update.ts @@ -89,6 +89,34 @@ export const paramDef = { required: ['choices'], }, }, + // (re)note with text, files and poll are optional + if: { + properties: { + renoteId: { + type: 'null', + }, + fileIds: { + type: 'null', + }, + mediaIds: { + type: 'null', + }, + poll: { + type: 'null', + }, + }, + }, + then: { + properties: { + text: { + type: 'string', + minLength: 1, + maxLength: MAX_NOTE_TEXT_LENGTH, + pattern: '[^\\s]+', + }, + }, + required: ['text'], + }, required: ['noteId', 'text', 'cw'], } as const;