1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Merge pull request #688 from vryazanov/master

New content type related to Telegram Passport
This commit is contained in:
FrankWang 2019-10-30 21:22:36 +08:00 committed by GitHub
commit c6358f35d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -371,6 +371,9 @@ class Message(JsonDeserializable):
if 'poll' in obj: if 'poll' in obj:
opts['poll'] = Poll.de_json(obj['poll']) opts['poll'] = Poll.de_json(obj['poll'])
content_type = 'poll' content_type = 'poll'
if 'passport_data' in obj:
opts['passport_data'] = obj['passport_data']
content_type = 'passport_data'
return cls(message_id, from_user, date, chat, content_type, opts, json_string) return cls(message_id, from_user, date, chat, content_type, opts, json_string)
@classmethod @classmethod