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

Merge branch 'master' into patch-1

This commit is contained in:
FrankWang 2019-10-30 21:24:43 +08:00 committed by GitHub
commit 575fb9da7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View File

@ -1,5 +1,5 @@
py==1.4.29
pytest==3.0.2
requests==2.7.0
requests==2.20.0
six==1.9.0
wheel==0.24.0

View File

@ -107,8 +107,8 @@ def get_file_url(token, file_id):
if FILE_URL is None:
return "https://api.telegram.org/file/bot{0}/{1}".format(token, get_file(token, file_id).file_path)
else:
return FILE_URL.format(token, get_file(token, file_id).file_path)
return FILE_URL.format(token, get_file(token, file_id)['file_path'])
def download_file(token, file_path):
url = FILE_URL.format(token, file_path)

View File

@ -371,6 +371,9 @@ class Message(JsonDeserializable):
if 'poll' in obj:
opts['poll'] = Poll.de_json(obj['poll'])
content_type = 'poll'
if 'passport_data' in obj:
opts['passport_data'] = obj['passport_data']
content_type = 'passport_data'
return cls(message_id, from_user, date, chat, content_type, opts, json_string)
@classmethod