1
0
Fork 0

fix bug removing reactions when there are multiple

This commit is contained in:
Cadence Ember 2023-09-29 01:03:10 +13:00
parent 39f41e7d53
commit ae3a86bff2

View file

@ -43,7 +43,9 @@ async function removeReaction(data) {
if (!lookingAtMatrixReaction && !wantToRemoveMatrixReaction) { if (!lookingAtMatrixReaction && !wantToRemoveMatrixReaction) {
// We are removing a Discord user's reaction, so we just make the sim user remove it. // 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) 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)
}
} }
} }
} }