Add video flags for animated stickers

This commit is contained in:
Tulir Asokan
2021-08-19 14:43:57 +03:00
parent 52bfbddcca
commit 64107fab17
+6 -2
View File
@@ -249,10 +249,14 @@ class PortalTelegram(BasePortal, ABC):
if info.thumbnail_info:
info.thumbnail_info.width = info.width
info.thumbnail_info.height = info.height
if attrs.is_gif:
info["fi.mau.telegram.gif"] = True
if attrs.is_gif or (attrs.is_sticker and info.mimetype == "video/webm"):
if attrs.is_gif:
info["fi.mau.telegram.gif"] = True
else:
info["fi.mau.telegram.animated_sticker"] = True
info["fi.mau.loop"] = True
info["fi.mau.autoplay"] = True
info["fi.mau.hide_controls"] = True
info["fi.mau.no_audio"] = True
content = MediaMessageEventContent(