core: fix response dropping when formatting is returned as an empty string
This commit is contained in:
parent
2446a20a5b
commit
151107aa81
2
main.py
2
main.py
|
@ -195,7 +195,7 @@ def queue_processor():
|
||||||
response, formatting = mod.process(msg)
|
response, formatting = mod.process(msg)
|
||||||
|
|
||||||
if response:
|
if response:
|
||||||
if formatting == None:
|
if not formatting:
|
||||||
updater.bot.send_message(chat_id=msg.chat.id, text=response,
|
updater.bot.send_message(chat_id=msg.chat.id, text=response,
|
||||||
disable_web_page_preview=True)
|
disable_web_page_preview=True)
|
||||||
print(f"Responded using module {mod.path} ({mod.alias}) with text: {response}")
|
print(f"Responded using module {mod.path} ({mod.alias}) with text: {response}")
|
||||||
|
|
|
@ -195,7 +195,7 @@ def queue_processor():
|
||||||
response, formatting = mod.process(msg)
|
response, formatting = mod.process(msg)
|
||||||
|
|
||||||
if response:
|
if response:
|
||||||
if formatting == None:
|
if not formatting:
|
||||||
print(f"Responded using module {mod.path} ({mod.alias}) with text: {response}")
|
print(f"Responded using module {mod.path} ({mod.alias}) with text: {response}")
|
||||||
break
|
break
|
||||||
elif formatting in ["Markdown", "MarkdownV2", "HTML"]:
|
elif formatting in ["Markdown", "MarkdownV2", "HTML"]:
|
||||||
|
|
Loading…
Reference in New Issue