Remove element ios hack from non-sticker documents
This commit is contained in:
@@ -193,13 +193,13 @@ class PortalTelegram(BasePortal, ABC):
|
|||||||
height=file.thumbnail.height or thumb_size.h,
|
height=file.thumbnail.height or thumb_size.h,
|
||||||
width=file.thumbnail.width or thumb_size.w,
|
width=file.thumbnail.width or thumb_size.w,
|
||||||
size=file.thumbnail.size)
|
size=file.thumbnail.size)
|
||||||
else:
|
elif attrs.is_sticker:
|
||||||
# This is a hack for bad clients like Element iOS that require a thumbnail
|
# This is a hack for bad clients like Element iOS that require a thumbnail
|
||||||
|
info.thumbnail_info = ImageInfo.deserialize(info.serialize())
|
||||||
if file.decryption_info:
|
if file.decryption_info:
|
||||||
info.thumbnail_file = file.decryption_info
|
info.thumbnail_file = file.decryption_info
|
||||||
else:
|
else:
|
||||||
info.thumbnail_url = file.mxc
|
info.thumbnail_url = file.mxc
|
||||||
info.thumbnail_info = ImageInfo.deserialize(info.serialize())
|
|
||||||
|
|
||||||
return info, name
|
return info, name
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user