mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-11-22 23:27:49 +01:00
Allow InputFile to handle video notes
This commit is contained in:
parent
0e2bcf28a6
commit
41299244b7
1 changed files with 6 additions and 2 deletions
|
@ -35,7 +35,8 @@ from telegram import TelegramError
|
|||
|
||||
DEFAULT_MIME_TYPE = 'application/octet-stream'
|
||||
USER_AGENT = 'Python Telegram Bot (https://github.com/python-telegram-bot/python-telegram-bot)'
|
||||
FILE_TYPES = ('audio', 'document', 'photo', 'sticker', 'video', 'voice', 'certificate')
|
||||
FILE_TYPES = ('audio', 'document', 'photo', 'sticker', 'video', 'voice', 'certificate',
|
||||
'video_note')
|
||||
|
||||
|
||||
class InputFile(object):
|
||||
|
@ -66,6 +67,9 @@ class InputFile(object):
|
|||
elif 'certificate' in data:
|
||||
self.input_name = 'certificate'
|
||||
self.input_file = data.pop('certificate')
|
||||
elif 'video_note' in data:
|
||||
self.input_name = 'video_note'
|
||||
self.input_file = data.pop('video_note')
|
||||
else:
|
||||
raise TelegramError('Unknown inputfile type')
|
||||
|
||||
|
|
Loading…
Reference in a new issue