summaryrefslogtreecommitdiff
path: root/src/client/app/common/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/app/common/scripts')
-rw-r--r--src/client/app/common/scripts/note-mixin.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/client/app/common/scripts/note-mixin.ts b/src/client/app/common/scripts/note-mixin.ts
index 39e23f94ea..76059fbb0c 100644
--- a/src/client/app/common/scripts/note-mixin.ts
+++ b/src/client/app/common/scripts/note-mixin.ts
@@ -142,6 +142,14 @@ export default (opts: Opts = {}) => ({
});
},
+ undoReact(note) {
+ const oldReaction = note.myReaction;
+ if (!oldReaction) return;
+ this.$root.api('notes/reactions/delete', {
+ noteId: note.id
+ });
+ },
+
favorite() {
this.$root.api('notes/favorites/create', {
noteId: this.appearNote.id