forked from mirror/mautrix-discord
Don't panic if redacting attachment fails
This commit is contained in:
parent
185f9a8963
commit
c710ea18aa
1 changed files with 3 additions and 2 deletions
|
@ -884,12 +884,13 @@ func (portal *Portal) handleDiscordMessageUpdate(user *User, msg *discordgo.Mess
|
|||
for _, deletedAttachment := range attachmentMap {
|
||||
resp, err := intent.RedactEvent(portal.MXID, deletedAttachment.MXID)
|
||||
if err != nil {
|
||||
log.Warn().Err(err).
|
||||
log.Err(err).
|
||||
Str("event_id", deletedAttachment.MXID.String()).
|
||||
Msg("Failed to redact attachment")
|
||||
} else {
|
||||
redactions.Str(deletedAttachment.AttachmentID, resp.EventID.String())
|
||||
}
|
||||
deletedAttachment.Delete()
|
||||
redactions.Str(deletedAttachment.AttachmentID, resp.EventID.String())
|
||||
}
|
||||
|
||||
var converted *ConvertedMessage
|
||||
|
|
Loading…
Reference in a new issue