From 96d99f04fbf3db94dd829afe9c2caaea8648b718 Mon Sep 17 00:00:00 2001 From: Mar0xy Date: Fri, 13 Oct 2023 22:29:14 +0200 Subject: [PATCH] upd: change unrenote function --- packages/backend/src/server/api/endpoints/notes/unrenote.ts | 2 +- packages/frontend/src/components/MkNote.vue | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/backend/src/server/api/endpoints/notes/unrenote.ts b/packages/backend/src/server/api/endpoints/notes/unrenote.ts index 1c6e32cb20..1b71de4966 100644 --- a/packages/backend/src/server/api/endpoints/notes/unrenote.ts +++ b/packages/backend/src/server/api/endpoints/notes/unrenote.ts @@ -66,7 +66,7 @@ export default class extends Endpoint { // eslint- }); for (const note of renotes) { - this.noteDeleteService.delete(await this.usersRepository.findOneByOrFail({ id: me.id }), note, false, me); + this.noteDeleteService.delete(await this.usersRepository.findOneByOrFail({ id: me.id }), note, false); } }); } diff --git a/packages/frontend/src/components/MkNote.vue b/packages/frontend/src/components/MkNote.vue index 8fe76917f7..fcc596b83c 100644 --- a/packages/frontend/src/components/MkNote.vue +++ b/packages/frontend/src/components/MkNote.vue @@ -102,7 +102,7 @@ SPDX-License-Identifier: AGPL-3.0-only class="_button" :style="renoted ? 'color: var(--accent) !important;' : ''" v-on:click.stop - @mousedown="renoted ? undoRenote() : renote()" + @mousedown="renoted ? undoRenote(appearNote) : renote()" >

{{ appearNote.renoteCount }}

@@ -442,10 +442,10 @@ function undoReact(note): void { }); } -function undoRenote() : void { +function undoRenote(note) : void { if (!renoted.value) return; os.api("notes/unrenote", { - noteId: appearNote.id, + noteId: note.id, }); renoted.value = false; }