From ae3a86bff2d607da74f095d47e863f374c0e3846 Mon Sep 17 00:00:00 2001 From: Cadence Ember Date: Fri, 29 Sep 2023 01:03:10 +1300 Subject: [PATCH] fix bug removing reactions when there are multiple --- d2m/actions/remove-reaction.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/d2m/actions/remove-reaction.js b/d2m/actions/remove-reaction.js index 632d5e2..b818867 100644 --- a/d2m/actions/remove-reaction.js +++ b/d2m/actions/remove-reaction.js @@ -43,7 +43,9 @@ async function removeReaction(data) { if (!lookingAtMatrixReaction && !wantToRemoveMatrixReaction) { // We are removing a Discord user's reaction, so we just make the sim user remove it. const mxid = select("sim", "mxid", "WHERE discord_id = ?").pluck().get(data.user_id) - await api.redactEvent(roomID, event.event_id, mxid) + if (mxid === event.sender) { + await api.redactEvent(roomID, event.event_id, mxid) + } } } }