From e8fc5ec37e2b41dd7668bb9bf827dc78085abbbf Mon Sep 17 00:00:00 2001 From: Lhcfl Date: Mon, 1 Jan 2024 21:28:28 +0800 Subject: [PATCH] fix: unrenote should only delete renotes, not quotes --- packages/backend/src/server/api/endpoints/notes/unrenote.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/server/api/endpoints/notes/unrenote.ts b/packages/backend/src/server/api/endpoints/notes/unrenote.ts index 4a3966123..3f6f260ee 100644 --- a/packages/backend/src/server/api/endpoints/notes/unrenote.ts +++ b/packages/backend/src/server/api/endpoints/notes/unrenote.ts @@ -48,6 +48,9 @@ export default define(meta, paramDef, async (ps, user) => { }); for (const note of renotes) { - deleteNote(await Users.findOneByOrFail({ id: user.id }), note); + // Only renotes should be deleted, not quotes + if (!note.text) { + deleteNote(await Users.findOneByOrFail({ id: user.id }), note); + } } });