media: bridge GIFs as documents rather than images

This allows them to be animated.

Closes PLAT-25990

Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
This commit is contained in:
Sumner Evans
2024-08-07 16:25:17 -06:00
parent 83695b4336
commit 497bfb152e
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -82,7 +82,7 @@ func toTelegramEntity(br telegramfmt.BodyRange) tg.MessageEntityClass {
}
func Parse(ctx context.Context, parser *HTMLParser, content *event.MessageEventContent) (string, []tg.MessageEntityClass) {
if content.MsgType.IsMedia() && content.FileName == "" {
if content.MsgType.IsMedia() && (content.FileName == "" || content.FileName == content.Body) {
// The body is the filename.
return "", nil
}