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 8693f0c6ac..b8cbe4f283 100644 --- a/packages/backend/src/server/api/stream/channels/bubble-timeline.ts +++ b/packages/backend/src/server/api/stream/channels/bubble-timeline.ts @@ -72,6 +72,13 @@ class BubbleTimelineChannel extends Channel { } } + 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; + } + } + this.connection.cacheNote(note); this.send('note', note); diff --git a/packages/backend/src/server/api/stream/channels/global-timeline.ts b/packages/backend/src/server/api/stream/channels/global-timeline.ts index 6fe76747ee..43aa99e8c4 100644 --- a/packages/backend/src/server/api/stream/channels/global-timeline.ts +++ b/packages/backend/src/server/api/stream/channels/global-timeline.ts @@ -67,6 +67,13 @@ class GlobalTimelineChannel extends Channel { } } + 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; + } + } + this.connection.cacheNote(note); this.send('note', note); diff --git a/packages/backend/src/server/api/stream/channels/home-timeline.ts b/packages/backend/src/server/api/stream/channels/home-timeline.ts index 359ab3e223..05040b9099 100644 --- a/packages/backend/src/server/api/stream/channels/home-timeline.ts +++ b/packages/backend/src/server/api/stream/channels/home-timeline.ts @@ -88,6 +88,13 @@ class HomeTimelineChannel extends Channel { } } + 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; + } + } + this.connection.cacheNote(note); this.send('note', note); diff --git a/packages/backend/src/server/api/stream/channels/hybrid-timeline.ts b/packages/backend/src/server/api/stream/channels/hybrid-timeline.ts index 01645fe657..b268904f04 100644 --- a/packages/backend/src/server/api/stream/channels/hybrid-timeline.ts +++ b/packages/backend/src/server/api/stream/channels/hybrid-timeline.ts @@ -106,6 +106,13 @@ class HybridTimelineChannel extends Channel { } } + 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; + } + } + this.connection.cacheNote(note); this.send('note', note); diff --git a/packages/backend/src/server/api/stream/channels/local-timeline.ts b/packages/backend/src/server/api/stream/channels/local-timeline.ts index 1f9d25b44d..8d75a0c3a2 100644 --- a/packages/backend/src/server/api/stream/channels/local-timeline.ts +++ b/packages/backend/src/server/api/stream/channels/local-timeline.ts @@ -77,6 +77,13 @@ class LocalTimelineChannel extends Channel { } } + 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; + } + } + this.connection.cacheNote(note); this.send('note', note);