Attach the `chat_id` for a callback query from a chat group (fixes #8461) (#8523)

pull/8528/head
Eugenio Panadero 2017-07-17 13:47:28 +02:00 committed by Martin Hjelmare
parent f0479855bd
commit cca0d3ed44
1 changed files with 2 additions and 0 deletions

View File

@ -581,6 +581,8 @@ class BaseTelegramBotEntity:
data[ATTR_FROM_LAST] = msg_data['from']['last_name']
if 'chat' in msg_data:
data[ATTR_CHAT_ID] = msg_data['chat']['id']
elif ATTR_MESSAGE in msg_data and 'chat' in msg_data[ATTR_MESSAGE]:
data[ATTR_CHAT_ID] = msg_data[ATTR_MESSAGE]['chat']['id']
return True, data