mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-03-16 20:29:55 +01:00
user without username
fix library crash when connect user without username
This commit is contained in:
parent
cde440542a
commit
164d6d2942
1 changed files with 1 additions and 1 deletions
|
@ -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']:
|
||||
|
|
Loading…
Add table
Reference in a new issue