add: like button

This commit is contained in:
Mar0xy 2023-10-01 01:53:17 +02:00
parent 8d4e99b3a9
commit 802ad0fa02
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828
3 changed files with 66 additions and 9 deletions

View file

@ -343,6 +343,9 @@ export class NoteEntityService implements OnModuleInit {
uri: note.uri ?? undefined,
url: note.url ?? undefined,
updatedAt: note.updatedAt != null ? note.updatedAt.toISOString() : undefined,
...(meId ? {
myReaction: this.populateMyReaction(note, meId, options?._hint_),
} : {}),
...(opts.detail ? {
clippedCount: note.clippedCount,
@ -358,10 +361,6 @@ export class NoteEntityService implements OnModuleInit {
}) : undefined,
poll: note.hasPoll ? this.populatePoll(note, meId) : undefined,
...(meId ? {
myReaction: this.populateMyReaction(note, meId, options?._hint_),
} : {}),
} : {}),
});