user without username

fix library crash when connect user without username
This commit is contained in:
Alex Root 2015-07-11 09:57:27 +03:00
parent cde440542a
commit 164d6d2942

View file

@ -62,7 +62,7 @@ class Message(object):
from_user = None
if 'chat' in data:
if 'username' in data['chat']:
if 'username' in data['chat'] or 'id' in data['chat']:
from telegram import User
chat = User.de_json(data['chat'])
if 'title' in data['chat']: