diff options
| author | piuvas <piuvas@proton.me> | 2025-01-08 12:51:46 -0300 |
|---|---|---|
| committer | piuvas <piuvas@proton.me> | 2025-01-08 12:51:46 -0300 |
| commit | 5fc9c1c8cdebec868440cd8ed4b3ad84f214e117 (patch) | |
| tree | 0187f26df8f14631a6fa7510e1aedfdd7425ae17 /packages/backend/src/server/api/stream/channels/bubble-timeline.ts | |
| parent | merge: fix: populate myreaction on replies for streams. (!839) (diff) | |
| download | sharkey-5fc9c1c8cdebec868440cd8ed4b3ad84f214e117.tar.gz sharkey-5fc9c1c8cdebec868440cd8ed4b3ad84f214e117.tar.bz2 sharkey-5fc9c1c8cdebec868440cd8ed4b3ad84f214e117.zip | |
shallow clone
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.ts | 19 |
1 files changed, 3 insertions, 16 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 b2745db92d..98ecf16a83 100644 --- a/packages/backend/src/server/api/stream/channels/bubble-timeline.ts +++ b/packages/backend/src/server/api/stream/channels/bubble-timeline.ts @@ -65,24 +65,11 @@ class BubbleTimelineChannel extends Channel { if (this.isNoteMutedOrBlocked(note)) return; - const reactionsToFetch = []; - if (this.user && isRenotePacked(note) && !isQuotePacked(note)) { - if (note.renote) { - reactionsToFetch.push(this.assignMyReaction(note.renote, this.noteEntityService)); - if (note.renote.reply) { - reactionsToFetch.push(this.assignMyReaction(note.renote.reply, this.noteEntityService)); - } - } - } - if (this.user && note.reply) { - reactionsToFetch.push(this.assignMyReaction(note.reply, this.noteEntityService)); - } + const clonedNote = await this.assignMyReaction(note, this.noteEntityService); - await Promise.all(reactionsToFetch); + this.connection.cacheNote(clonedNote); - this.connection.cacheNote(note); - - this.send('note', note); + this.send('note', clonedNote); } @bindThis |