perf(backend): reduce needless populateMyReaction calls
This commit is contained in:
parent
de6e15e36d
commit
fcc4864080
8 changed files with 29 additions and 15 deletions
|
@ -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_),
|
||||
} : {}),
|
||||
} : {}),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue