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

Merge pull request #1005 from Badiboy/master

Animation content_type
This commit is contained in:
Badiboy 2020-11-03 23:26:53 +03:00 committed by GitHub
commit 1d99cc224f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -296,12 +296,13 @@ class Message(JsonDeserializable):
if 'audio' in obj:
opts['audio'] = Audio.de_json(obj['audio'])
content_type = 'audio'
if 'animation' in obj:
opts['animation'] = Animation.de_json(obj['animation'])
content_type = 'animation'
if 'document' in obj:
opts['document'] = Document.de_json(obj['document'])
content_type = 'document'
if 'animation' in obj:
# Document content type accompanies "animation", so "animation" should be checked below "document" to override it
opts['animation'] = Animation.de_json(obj['animation'])
content_type = 'animation'
if 'game' in obj:
opts['game'] = Game.de_json(obj['game'])
content_type = 'game'