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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user