summaryrefslogtreecommitdiff
path: root/packages/backend/src/core/entities
diff options
context:
space:
mode:
authorHazelnoot <acomputerdog@gmail.com>2025-04-01 20:47:04 -0400
committerHazelnoot <acomputerdog@gmail.com>2025-04-01 20:47:04 -0400
commit6ac37b4d6cae064545b13fd7fdb414d0cffa178b (patch)
tree8e938baa2b15ccd233e91429d7f5ed7566ae3606 /packages/backend/src/core/entities
parentfix typo in check_connect.js (diff)
downloadsharkey-6ac37b4d6cae064545b13fd7fdb414d0cffa178b.tar.gz
sharkey-6ac37b4d6cae064545b13fd7fdb414d0cffa178b.tar.bz2
sharkey-6ac37b4d6cae064545b13fd7fdb414d0cffa178b.zip
lint and type fixes
Diffstat (limited to 'packages/backend/src/core/entities')
-rw-r--r--packages/backend/src/core/entities/NoteEntityService.ts18
1 files changed, 10 insertions, 8 deletions
diff --git a/packages/backend/src/core/entities/NoteEntityService.ts b/packages/backend/src/core/entities/NoteEntityService.ts
index 537677ed34..c3d00ffa9d 100644
--- a/packages/backend/src/core/entities/NoteEntityService.ts
+++ b/packages/backend/src/core/entities/NoteEntityService.ts
@@ -479,14 +479,6 @@ 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,
@@ -505,6 +497,16 @@ 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_),
+ } : {}),
} : {}),
});