mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-07 04:26:58 +00:00
restore poll and myReaction for packed notes
This commit is contained in:
parent
bfcb877bc4
commit
353728929e
1 changed files with 9 additions and 10 deletions
|
@ -479,6 +479,15 @@ export class NoteEntityService implements OnModuleInit {
|
||||||
mentions: note.mentions && note.mentions.length > 0 ? note.mentions : undefined,
|
mentions: note.mentions && note.mentions.length > 0 ? note.mentions : undefined,
|
||||||
uri: note.uri ?? undefined,
|
uri: note.uri ?? undefined,
|
||||||
url: note.url ?? 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 ? {
|
...(opts.detail ? {
|
||||||
clippedCount: note.clippedCount,
|
clippedCount: note.clippedCount,
|
||||||
|
@ -497,16 +506,6 @@ export class NoteEntityService implements OnModuleInit {
|
||||||
withReactionAndUserPairCache: opts.withReactionAndUserPairCache,
|
withReactionAndUserPairCache: opts.withReactionAndUserPairCache,
|
||||||
_hint_: options?._hint_,
|
_hint_: options?._hint_,
|
||||||
}) : undefined,
|
}) : 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_),
|
|
||||||
} : {}),
|
|
||||||
} : {}),
|
} : {}),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue