small refactor

This commit is contained in:
piuvas 2025-01-08 12:58:57 -03:00 committed by kakkokari-gtyih
parent 17088c383f
commit 750c05ba7c
1 changed files with 8 additions and 8 deletions

View File

@ -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) {