From b4a8763452d9073baa09731f2778bd6a0c38cb70 Mon Sep 17 00:00:00 2001 From: Mendel E Date: Wed, 3 Jul 2019 10:59:11 -0400 Subject: [PATCH] Message: media = None if WebPage is empty --- pyrogram/client/types/messages_and_media/message.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyrogram/client/types/messages_and_media/message.py b/pyrogram/client/types/messages_and_media/message.py index 323693c5..a1d42b79 100644 --- a/pyrogram/client/types/messages_and_media/message.py +++ b/pyrogram/client/types/messages_and_media/message.py @@ -574,6 +574,8 @@ class Message(Object, Update): elif isinstance(media, types.MessageMediaWebPage): if isinstance(media.webpage, types.WebPage): web_page = pyrogram.WebPage._parse(client, media.webpage) + else: + media = None elif isinstance(media, types.MessageMediaPoll): poll = pyrogram.Poll._parse(client, media)