deep-copy notes before syncing visibility

This commit is contained in:
Hazelnoot 2025-08-14 02:35:54 -04:00
parent bac4d43773
commit 2bb7980fe7

View file

@ -167,8 +167,16 @@ export class NoteVisibilityService {
// Copy note since we mutate it below
note = {
...note,
renote: note.renote ? { ...note.renote } : null,
reply: note.reply ? { ...note.reply } : null,
renote: note.renote ? {
...note.renote,
renote: note.renote.renote ? { ...note.renote.renote } : null,
reply: note.renote.reply ? { ...note.renote.reply } : null,
} : null,
reply: note.reply ? {
...note.reply,
renote: note.reply.renote ? { ...note.reply.renote } : null,
reply: note.reply.reply ? { ...note.reply.reply } : null,
} : null,
} as PopulatedNote;
this.syncVisibility(note);