From d9c8c7af98e5dd3e7136a445a74515747286fbdd Mon Sep 17 00:00:00 2001 From: Freeplay Date: Thu, 25 May 2023 15:49:39 -0400 Subject: [PATCH] Fix polls & own reactions not showing in replies --- packages/backend/src/models/repositories/note.ts | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/packages/backend/src/models/repositories/note.ts b/packages/backend/src/models/repositories/note.ts index 1310c14b0..652016355 100644 --- a/packages/backend/src/models/repositories/note.ts +++ b/packages/backend/src/models/repositories/note.ts @@ -236,6 +236,12 @@ export const NoteRepository = db.getRepository(Note).extend({ uri: note.uri || undefined, url: note.url || undefined, updatedAt: note.updatedAt?.toISOString() || undefined, + poll: note.hasPoll ? populatePoll(note, meId) : undefined, + ...(meId + ? { + myReaction: populateMyReaction(note, meId, options?._hint_), + } + : {}), ...(opts.detail ? { @@ -252,14 +258,6 @@ export const NoteRepository = db.getRepository(Note).extend({ _hint_: options?._hint_, }) : undefined, - - poll: note.hasPoll ? populatePoll(note, meId) : undefined, - - ...(meId - ? { - myReaction: populateMyReaction(note, meId, options?._hint_), - } - : {}), } : {}), });