Add venue to message type.

This commit is contained in:
eternnoir 2016-04-14 11:02:19 +08:00
parent 8316a57845
commit 7b007dab99
1 changed files with 6 additions and 3 deletions

View File

@ -179,12 +179,15 @@ class Message(JsonDeserializable):
content_type = 'voice'
if 'caption' in obj:
opts['caption'] = obj['caption']
if 'location' in obj:
opts['location'] = Location.de_json(obj['location'])
content_type = 'location'
if 'contact' in obj:
opts['contact'] = Contact.de_json(json.dumps(obj['contact']))
content_type = 'contact'
if 'location' in obj:
opts['location'] = Location.de_json(obj['location'])
content_type = 'location'
if 'venue' in obj:
opts['venue'] = Venue.de_json(obj['venue'])
content_type = 'venue'
if 'new_chat_participant' in obj:
opts['new_chat_participant'] = User.de_json(obj['new_chat_participant'])
content_type = 'new_chat_participant'