connector/tomatrix: strip filename unconditionally on stickers
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
This commit is contained in:
@@ -386,15 +386,16 @@ func (c *TelegramClient) convertMediaRequiringUpload(ctx context.Context, portal
|
|||||||
}
|
}
|
||||||
|
|
||||||
if isSticker {
|
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) {
|
if c.main.Config.AnimatedSticker.Target == "webm" || (isVideo && !c.main.Config.AnimatedSticker.ConvertFromWebm) {
|
||||||
isVideoGif = true
|
isVideoGif = true
|
||||||
extraInfo["fi.mau.telegram.animated_sticker"] = true
|
extraInfo["fi.mau.telegram.animated_sticker"] = true
|
||||||
transferer.WithMIMEType("video/webm")
|
transferer.WithMIMEType("video/webm")
|
||||||
} else {
|
} else {
|
||||||
eventType = event.EventSticker
|
eventType = event.EventSticker
|
||||||
// Strip filename and msgtype if it's an actual m.sticker
|
content.MsgType = "" // Strip the msgtype since that doesn't apply for stickers
|
||||||
content.FileName = ""
|
|
||||||
content.MsgType = ""
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user