From ccf7969ec6fe05e55c8ce2dff76ec95c84e69b78 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sat, 28 Jan 2023 14:51:14 +0200 Subject: [PATCH] Fix gif metadata when message edits into a gif --- portal.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/portal.go b/portal.go index 5b4ee7a..6afdf18 100644 --- a/portal.go +++ b/portal.go @@ -1169,6 +1169,12 @@ func (portal *Portal) handleDiscordMessageUpdate(user *User, msg *discordgo.Mess } } content.SetEdit(existing[0].MXID) + extraContentCopy := map[string]any{} + for key, value := range extraContent { + extraContentCopy[key] = value + } + extraContentCopy["m.new_content"] = extraContent + extraContent = extraContentCopy var editTS int64 if msg.EditedTimestamp != nil {