Set already_sent value, otherwise it may be referenced before assignment

This commit is contained in:
Davte 2019-07-12 14:53:35 +02:00
parent 367b112809
commit 37d2b6f3d8

View File

@ -965,6 +965,7 @@ class Bot(TelegramBot, ObjectWithDatabase):
If photo was already sent by this bot and `use_stored_file_id` is set If photo was already sent by this bot and `use_stored_file_id` is set
to True, use file_id (it is faster and recommended). to True, use file_id (it is faster and recommended).
""" """
already_sent = False
if 'message' in update: if 'message' in update:
update = update['message'] update = update['message']
if chat_id is None and 'chat' in update: if chat_id is None and 'chat' in update: