Explorar el Código

Fix gif metadata when message edits into a gif

Tulir Asokan hace 2 años
padre
commit
ccf7969ec6
Se han modificado 1 ficheros con 6 adiciones y 0 borrados
  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)
+	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 {