From e76e6cd08f69ddd7f8c62039b9d3e64a7a6189ca Mon Sep 17 00:00:00 2001 From: piuvas Date: Wed, 8 Jan 2025 12:58:57 -0300 Subject: [PATCH] small refactor --- .../backend/src/server/api/stream/channel.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/backend/src/server/api/stream/channel.ts b/packages/backend/src/server/api/stream/channel.ts index ed6e41c4bb..6589a7af8d 100644 --- a/packages/backend/src/server/api/stream/channel.ts +++ b/packages/backend/src/server/api/stream/channel.ts @@ -115,14 +115,14 @@ export default abstract class Channel { clonedNote.renote.myReaction = myReaction; } } - } - if (this.user && note.renote?.reply && Object.keys(note.renote.reply.reactions).length > 0) { - const myReaction = await noteEntityService.populateMyReaction(note.renote.reply, this.user.id); - if (myReaction) { - changed = true; - clonedNote.renote = { ...note.renote }; - clonedNote.renote.reply = { ...note.renote.reply }; - clonedNote.renote.reply.myReaction = myReaction; + if (note.renote?.reply && Object.keys(note.renote.reply.reactions).length > 0) { + const myReaction = await noteEntityService.populateMyReaction(note.renote.reply, this.user.id); + if (myReaction) { + changed = true; + clonedNote.renote = { ...note.renote }; + clonedNote.renote.reply = { ...note.renote.reply }; + clonedNote.renote.reply.myReaction = myReaction; + } } } if (this.user && note.reply && Object.keys(note.reply.reactions).length > 0) {