Browse Source

Fix gif metadata when message edits into a gif

Tulir Asokan 2 years ago
parent
commit
ccf7969ec6
1 changed files with 6 additions and 0 deletions
  1. 6 0
      portal.go

+ 6 - 0
portal.go

@@ -1169,6 +1169,12 @@ func (portal *Portal) handleDiscordMessageUpdate(user *User, msg *discordgo.Mess
 		}
 		}
 	}
 	}
 	content.SetEdit(existing[0].MXID)
 	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
 	var editTS int64
 	if msg.EditedTimestamp != nil {
 	if msg.EditedTimestamp != nil {