From d3bea4c3b4e34b2714858b1dea12b35b189c3c86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jannes=20H=C3=B6ke?= Date: Tue, 3 Nov 2015 10:20:45 +0100 Subject: [PATCH] make user_from optional, because of channels --- telegram/message.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telegram/message.py b/telegram/message.py index e77f3ea4b..8e9242ea1 100644 --- a/telegram/message.py +++ b/telegram/message.py @@ -134,7 +134,7 @@ class Message(TelegramObject): if not data: return None - data['from_user'] = User.de_json(data['from']) + data['from_user'] = User.de_json(data.get('from')) data['date'] = datetime.fromtimestamp(data['date']) if 'first_name' in data.get('chat', ''): data['chat'] = User.de_json(data.get('chat'))