diff --git a/packages/backend/src/models/repositories/note.ts b/packages/backend/src/models/repositories/note.ts index 453179bd6..ecd5ead6d 100644 --- a/packages/backend/src/models/repositories/note.ts +++ b/packages/backend/src/models/repositories/note.ts @@ -246,7 +246,7 @@ export const NoteRepository = db.getRepository(Note).extend({ ...(opts.detail ? { reply: note.replyId - ? this.pack(note.reply || note.replyId, me, { + ? this.tryPack(note.reply || note.replyId, me, { detail: false, _hint_: options?._hint_, }) @@ -283,6 +283,24 @@ export const NoteRepository = db.getRepository(Note).extend({ return packed; }, + async tryPack( + src: Note["id"] | Note, + me?: { id: User["id"] } | null | undefined, + options?: { + detail?: boolean; + _hint_?: { + myReactions: Map; + }; + }, + ): Promise | undefined> { + try { + return await this.pack(src, me, options); + } + catch { + return undefined; + } + }, + async packMany( notes: Note[], me?: { id: User["id"] } | null | undefined, diff --git a/packages/client/src/components/MkSubNoteContent.vue b/packages/client/src/components/MkSubNoteContent.vue index fbc92a949..8206a5f18 100644 --- a/packages/client/src/components/MkSubNoteContent.vue +++ b/packages/client/src/components/MkSubNoteContent.vue @@ -25,6 +25,15 @@ > + + + + + +