Fix message.document for webpages

This commit is contained in:
Lonami Exo 2019-09-06 13:09:07 +02:00
parent d5faf5e8aa
commit 57049de23a

View File

@ -430,7 +430,7 @@ class Message(ChatGetter, SenderGetter, TLObject, abc.ABC):
return self.media.document return self.media.document
else: else:
web = self.web_preview web = self.web_preview
if web and isinstance(web.photo, types.Document): if web and isinstance(web.document, types.Document):
return web.photo return web.photo
@property @property