Add options to improve handling of webhook messages sent by other bridges

This commit is contained in:
Tulir Asokan
2023-05-27 13:01:24 +03:00
parent 824dea4745
commit 4393772ccc
6 changed files with 58 additions and 4 deletions

View File

@@ -897,6 +897,9 @@ func (portal *Portal) handleDiscordMessageUpdate(user *User, msg *discordgo.Mess
Msg("Dropping non-text edit")
return
}
if msg.WebhookID != "" {
addWebhookMeta(converted, msg)
}
converted.Content.Mentions = portal.convertDiscordMentions(msg, "", false)
converted.Content.SetEdit(existing[0].MXID)
// Never actually mention new users of edits, only include mentions inside m.new_content