1
0
Fork 0

Fix bridging interaction responses and edits

This commit is contained in:
Cadence Ember 2023-10-10 11:23:51 +13:00
parent e2dffe457e
commit 7790d98c66
5 changed files with 201 additions and 3 deletions

View file

@ -24,7 +24,7 @@ async function editToChanges(message, guild, api) {
const roomID = select("channel_room", "room_id", {channel_id: message.channel_id}).pluck().get()
assert(roomID)
/** @type {string?} Null if we don't have a sender in the room, which will happen if it's a webhook's message. The bridge bot will do the edit instead. */
const senderMxid = from("sim").join("sim_member", "mxid").where({user_id: message.author.id}).pluck("mxid").get() || null
const senderMxid = from("sim").join("sim_member", "mxid").where({user_id: message.author.id, room_id: roomID}).pluck("mxid").get() || null
const oldEventRows = select("event_message", ["event_id", "event_type", "event_subtype", "part"], {message_id: message.id}).all()