2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-29 21:38:04 +00:00

Message: media = None if WebPage is empty

This commit is contained in:
Mendel E 2019-07-03 10:59:11 -04:00
parent f7bfd5597e
commit b4a8763452

View File

@ -574,6 +574,8 @@ class Message(Object, Update):
elif isinstance(media, types.MessageMediaWebPage): elif isinstance(media, types.MessageMediaWebPage):
if isinstance(media.webpage, types.WebPage): if isinstance(media.webpage, types.WebPage):
web_page = pyrogram.WebPage._parse(client, media.webpage) web_page = pyrogram.WebPage._parse(client, media.webpage)
else:
media = None
elif isinstance(media, types.MessageMediaPoll): elif isinstance(media, types.MessageMediaPoll):
poll = pyrogram.Poll._parse(client, media) poll = pyrogram.Poll._parse(client, media)