From 487f11ffd7ca305a27ed77849a1370dff8d73462 Mon Sep 17 00:00:00 2001 From: Sumner Evans Date: Mon, 6 Jan 2025 10:44:17 -0700 Subject: [PATCH] connector/tomatrix: strip filename unconditionally on stickers Signed-off-by: Sumner Evans --- pkg/connector/tomatrix.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/connector/tomatrix.go b/pkg/connector/tomatrix.go index b49a32e7..f716c52f 100644 --- a/pkg/connector/tomatrix.go +++ b/pkg/connector/tomatrix.go @@ -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 } }