fix bug removing reactions when there are multiple
This commit is contained in:
parent
39f41e7d53
commit
ae3a86bff2
1 changed files with 3 additions and 1 deletions
|
@ -43,11 +43,13 @@ 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)
|
||||||
|
if (mxid === event.sender) {
|
||||||
await api.redactEvent(roomID, event.event_id, mxid)
|
await api.redactEvent(roomID, event.event_id, mxid)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {import("discord-api-types/v10").GatewayMessageReactionRemoveEmojiDispatchData} data
|
* @param {import("discord-api-types/v10").GatewayMessageReactionRemoveEmojiDispatchData} data
|
||||||
|
|
Loading…
Reference in a new issue