From 353728929e4a38a99654bf4b40ef98d2e2d7598d Mon Sep 17 00:00:00 2001 From: Hazelnoot Date: Sun, 13 Apr 2025 19:05:16 -0400 Subject: [PATCH] restore poll and myReaction for packed notes --- .../src/core/entities/NoteEntityService.ts | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/packages/backend/src/core/entities/NoteEntityService.ts b/packages/backend/src/core/entities/NoteEntityService.ts index c3d00ffa9d..eceb972a91 100644 --- a/packages/backend/src/core/entities/NoteEntityService.ts +++ b/packages/backend/src/core/entities/NoteEntityService.ts @@ -479,6 +479,15 @@ export class NoteEntityService implements OnModuleInit { mentions: note.mentions && note.mentions.length > 0 ? note.mentions : undefined, uri: note.uri ?? undefined, url: note.url ?? undefined, + poll: note.hasPoll ? this.populatePoll(note, meId) : undefined, + + ...(meId && Object.keys(reactions).length > 0 ? { + myReaction: this.populateMyReaction({ + id: note.id, + reactions: reactions, + reactionAndUserPairCache: reactionAndUserPairCache, + }, meId, options?._hint_), + } : {}), ...(opts.detail ? { clippedCount: note.clippedCount, @@ -497,16 +506,6 @@ export class NoteEntityService implements OnModuleInit { withReactionAndUserPairCache: opts.withReactionAndUserPairCache, _hint_: options?._hint_, }) : undefined, - - poll: note.hasPoll ? this.populatePoll(note, meId) : undefined, - - ...(meId && Object.keys(reactions).length > 0 ? { - myReaction: this.populateMyReaction({ - id: note.id, - reactions: reactions, - reactionAndUserPairCache: reactionAndUserPairCache, - }, meId, options?._hint_), - } : {}), } : {}), });