// The columns are event_id, event_type, event_subtype, message_id, channel_id, part, source. Only event_subtype could potentially be changed by a replacement event.
constsubtype=newContentWithoutType.msgtype??null
db.prepare("UPDATE event_message SET event_subtype = ? WHERE event_id = ?").run(subtype,oldID)
// Not redacting as the last action because the last action is likely to be shown in the room preview in clients, and we don't want it to look like somebody actually deleted a message.
for(consteventIDofeventsToRedact){
awaitapi.redactEvent(roomID,eventID,senderMxid)
// TODO: I should almost certainly remove the redacted event from our database now, shouldn't I? I mean, it's literally not there any more... you can't do anything else with it...
// TODO: If I just redacted part = 0, I should update one of the other events to make it the new part = 0, right?
// TODO: Consider whether this code could be reused between edited messages and deleted messages.