From 12a55372918f13fbbe7b49a89c36a7171195b483 Mon Sep 17 00:00:00 2001 From: Davte Date: Sat, 24 Nov 2018 15:42:00 +0100 Subject: [PATCH] Cannot use_stored if type(photo) is not str --- davtelepot/__init__.py | 2 +- davtelepot/custombot.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/davtelepot/__init__.py b/davtelepot/__init__.py index 3d1ae55..410ab76 100644 --- a/davtelepot/__init__.py +++ b/davtelepot/__init__.py @@ -7,7 +7,7 @@ __author__ = "Davide Testa" __email__ = "davte@libero.it" __credits__ = "Marco Origlia" __license__ = "GNU General Public License v3.0" -__version__ = "1.4.3" +__version__ = "1.4.4" __maintainer__ = "Davide Testa" __contact__ = "t.me/davte" diff --git a/davtelepot/custombot.py b/davtelepot/custombot.py index 55596d8..2604afb 100644 --- a/davtelepot/custombot.py +++ b/davtelepot/custombot.py @@ -1489,6 +1489,8 @@ class Bot(telepot.aio.Bot, Gettable): ) as photo_file: buffered_picture.write(photo_file.read()) photo = buffered_picture.getvalue() + else: + use_stored = False caption = escape_html_chars(caption) if len(caption) > 199: new_caption = ''