Skip to content

Commit 7346326

Browse files
committed
Fix video's thumb type forgot de_json.
1 parent f355796 commit 7346326

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎telebot/types.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,9 @@ def de_json(cls, json_string):
342342
width = obj['width']
343343
height = obj['height']
344344
duration = obj['duration']
345-
thumb = obj.get('thumb')
345+
thumb = None
346+
if 'thumb' in obj:
347+
thumb = PhotoSize.de_json(obj['thumb'])
346348
mime_type = obj.get('mime_type')
347349
file_size = obj.get('file_size')
348350
return cls(file_id, width, height, duration, thumb, mime_type, file_size)

0 commit comments

Comments
 (0)