Small fix

This commit is contained in:
Profitroll 2022-09-24 17:03:20 +02:00
parent 0e14ca600f
commit 46e3665749
1 changed files with 20 additions and 14 deletions

View File

@ -157,6 +157,7 @@ def send_content():
else:
caption = caption
try:
if ext_type == "photo": # type: ignore
if configGet("enabled", "caption"):
@ -179,6 +180,11 @@ def send_content():
else:
return
except Exception as exp:
logWrite(locale("post_exception", "console", locale=configGet("locale_log")).format(str(exp), format_exc()))
if configGet("error", "reports"):
app.send_message(configGet("admin"), locale("post_exception", "message", locale=configGet("locale")).format(exp, traceback.format_exc())) # type: ignore
return
index["sent"].append(candidate_file)
index["last_id"] = sent.id # type: ignore
@ -199,7 +205,7 @@ def send_content():
logWrite(locale("post_exception", "console", locale=configGet("locale_log")).format(str(exp), format_exc()))
if configGet("error", "reports"):
app.send_message(configGet("admin"), locale("post_exception", "message", locale=configGet("locale")).format(exp, traceback.format_exc())) # type: ignore
pass
return
# Work in progress