Fix regression on Telegram objects with thumb properties

This commit is contained in:
leandrotoledo 2015-09-04 18:50:26 -03:00
parent be23ff5d29
commit 49ff02dcf4
4 changed files with 6 additions and 1 deletions

View file

@ -65,4 +65,6 @@ class Document(TelegramObject):
if not data:
return None
data['thumb'] = PhotoSize.de_json(data.get('thumb'))
return Document(**data)

View file

@ -57,4 +57,3 @@ class ForceReply(ReplyMarkup):
return None
return ForceReply(**data)

View file

@ -67,4 +67,6 @@ class Sticker(TelegramObject):
if not data:
return None
data['thumb'] = PhotoSize.de_json(data.get('thumb'))
return Sticker(**data)

View file

@ -74,4 +74,6 @@ class Video(TelegramObject):
if not data:
return None
data['thumb'] = PhotoSize.de_json(data.get('thumb'))
return Video(**data)