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

Made Contact implement JsonDeserializable.

This commit is contained in:
pieter 2015-07-02 14:12:10 +02:00
parent 36ba21643b
commit bc3e2115ac

View File

@ -283,10 +283,10 @@ class Video(JsonDeserializable):
self.caption = caption
class Contact:
class Contact(JsonDeserializable):
@classmethod
def de_json(cls, json_string):
obj = json.loads(json_string)
obj = cls.check_json(json_string)
phone_number = obj['phone_number']
first_name = obj['first_name']
last_name = None