From 6477ad2cfc2198aa9e974a1879412b46366e1e94 Mon Sep 17 00:00:00 2001 From: Cj-bc Date: Sat, 13 Feb 2021 17:50:51 +0900 Subject: [PATCH] =?UTF-8?q?packedNoteSchema=E3=81=AE=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=BC=8F=E3=82=8C=E3=82=92=E4=BF=AE=E6=AD=A3=20(#7174)=20(#719?= =?UTF-8?q?0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add 'localOnly' to packedNoteSchema Related: #7174 Add 'emojis' to packedNoteSchema Add 'reactions' to packedNoteSchema Related: #7174 Add 'renoteCount' to packedNoteSchema Related: #7174 Add 'repliesCount' to packedNoteSchema Add 'uri' to packedNoteSchema Add 'url' to packedNoteSchema Add: _featuredId_ to packedNoteSchema Add '_prId_' to packedNoteSchema Add 'myReaction' to packedNoteSchema --- src/models/repositories/note.ts | 58 +++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/src/models/repositories/note.ts b/src/models/repositories/note.ts index 87ca5eb9e..32552db2f 100644 --- a/src/models/repositories/note.ts +++ b/src/models/repositories/note.ts @@ -412,5 +412,63 @@ export const packedNoteSchema = { optional: true as const, nullable: true as const, ref: 'Channel' }, + localOnly: { + type: 'boolean' as const, + optional: false as const, nullable: true as const, + }, + emojis: { + type: 'array' as const, + optional: false as const, nullable: false as const, + items: { + type: 'object' as const, + optional: false as const, nullable: false as const, + properties: { + name: { + type: 'string' as const, + optional: false as const, nullable: false as const, + }, + url: { + type: 'string' as const, + optional: false as const, nullable: false as const, + }, + }, + }, + }, + reactions: { + type: 'object' as const, + optional: false as const, nullable: false as const, + description: 'Key is either Unicode emoji or custom emoji, value is count of that emoji reaction.', + }, + renoteCount: { + type: 'number' as const, + optional: false as const, nullable: false as const, + }, + repliesCount: { + type: 'number' as const, + optional: false as const, nullable: false as const, + }, + uri: { + type: 'string' as const, + optional: false as const, nullable: true as const, + description: 'The URI of a note. it will be null when the note is local.', + }, + url: { + type: 'string' as const, + optional: false as const, nullable: true as const, + description: 'The human readable url of a note. it will be null when the note is local.', + }, + _featuredId_: { + type: 'string' as const, + optional: false as const, nullable: true as const, + }, + _prId_: { + type: 'string' as const, + optional: false as const, nullable: true as const, + }, + myReaction: { + type: 'object' as const, + optional: true as const, nullable: true as const, + description: 'Key is either Unicode emoji or custom emoji, value is count of that emoji reaction.', + }, }, };