Fix retrying failed m->d edits

The mutated event was being used as the error payload instead of the
original event, so it forgot that it was an edit.
This commit is contained in:
Cadence Ember 2025-03-12 09:41:30 +13:00
commit 3975550582
2 changed files with 2 additions and 2 deletions

View file

@ -546,7 +546,7 @@ async function eventToMessage(event, guild, di) {
if (!messageIDsToEdit.length) return
// Ok, it's an edit.
event.content = event.content["m.new_content"]
event = {...event, content: event.content["m.new_content"]}
// Is it editing a reply? We need special handling if it is.
// Get the original event, then check if it was a reply