connector/tomatrix: strip filename unconditionally on stickers

Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
This commit is contained in:
Sumner Evans
2025-01-06 10:44:17 -07:00
parent 655cd98f27
commit 487f11ffd7
+4 -3
View File
@@ -386,15 +386,16 @@ func (c *TelegramClient) convertMediaRequiringUpload(ctx context.Context, portal
}
if isSticker {
// Strip filename so that we never render the caption
content.FileName = ""
if c.main.Config.AnimatedSticker.Target == "webm" || (isVideo && !c.main.Config.AnimatedSticker.ConvertFromWebm) {
isVideoGif = true
extraInfo["fi.mau.telegram.animated_sticker"] = true
transferer.WithMIMEType("video/webm")
} else {
eventType = event.EventSticker
// Strip filename and msgtype if it's an actual m.sticker
content.FileName = ""
content.MsgType = ""
content.MsgType = "" // Strip the msgtype since that doesn't apply for stickers
}
}