perf(backend): reduce needless populateMyReaction calls

This commit is contained in:
syuilo 2023-10-19 07:56:25 +09:00
parent de6e15e36d
commit fcc4864080
8 changed files with 29 additions and 15 deletions

View file

@ -357,7 +357,7 @@ export class NoteEntityService implements OnModuleInit {
poll: note.hasPoll ? this.populatePoll(note, meId) : undefined,
...(meId ? {
...(meId && Object.keys(note.reactions).length > 0 ? {
myReaction: this.populateMyReaction(note.id, meId, options?._hint_),
} : {}),
} : {}),