fix: unrenote should only delete renotes, not quotes (Catodon #67)

This commit is contained in:
Lhcfl 2024-02-26 20:44:14 +08:00
parent 662b2cc555
commit 6a002fd785

View file

@ -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);
}
}
});