summaryrefslogtreecommitdiff
path: root/packages/backend/src/server/api/stream/channels/bubble-timeline.ts
diff options
context:
space:
mode:
authorpiuvas <piuvas@proton.me>2024-12-23 20:42:21 -0300
committerpiuvas <piuvas@proton.me>2024-12-23 20:42:21 -0300
commit94c3a71e499f8d508dfd1e49727d6a2d04031873 (patch)
tree4c47aeb5160172bfd8e7d9f86b268e1c830c597f /packages/backend/src/server/api/stream/channels/bubble-timeline.ts
parentpopulate myreaction on replies for streams. (diff)
downloadsharkey-94c3a71e499f8d508dfd1e49727d6a2d04031873.tar.gz
sharkey-94c3a71e499f8d508dfd1e49727d6a2d04031873.tar.bz2
sharkey-94c3a71e499f8d508dfd1e49727d6a2d04031873.zip
improvements.
Diffstat (limited to 'packages/backend/src/server/api/stream/channels/bubble-timeline.ts')
-rw-r--r--packages/backend/src/server/api/stream/channels/bubble-timeline.ts10
1 files changed, 8 insertions, 2 deletions
diff --git a/packages/backend/src/server/api/stream/channels/bubble-timeline.ts b/packages/backend/src/server/api/stream/channels/bubble-timeline.ts
index b8cbe4f283..41b7b7cd3c 100644
--- a/packages/backend/src/server/api/stream/channels/bubble-timeline.ts
+++ b/packages/backend/src/server/api/stream/channels/bubble-timeline.ts
@@ -70,12 +70,18 @@ class BubbleTimelineChannel extends Channel {
const myRenoteReaction = await this.noteEntityService.populateMyReaction(note.renote, this.user.id);
note.renote.myReaction = myRenoteReaction;
}
+ if (note.renote && note.renote.reply) {
+ if (Object.keys(note.renote.reply.reactions).length > 0) {
+ const myReplyReaction = await this.noteEntityService.populateMyReaction(note.renote.reply, this.user.id);
+ note.renote.reply.myReaction = myReplyReaction;
+ }
+ }
}
if (this.user && note.reply) {
if (Object.keys(note.reply.reactions).length > 0) {
- const myRenoteReaction = await this.noteEntityService.populateMyReaction(note.reply, this.user.id);
- note.reply.myReaction = myRenoteReaction;
+ const myReplyReaction = await this.noteEntityService.populateMyReaction(note.reply, this.user.id);
+ note.reply.myReaction = myReplyReaction;
}
}