From 151107aa811268426c9236181bdb6f5ab9168433 Mon Sep 17 00:00:00 2001 From: dymik739 Date: Thu, 21 Sep 2023 19:29:53 +0300 Subject: [PATCH] core: fix response dropping when formatting is returned as an empty string --- main.py | 2 +- module-testing.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index cdbeb92..4dbfc79 100644 --- a/main.py +++ b/main.py @@ -195,7 +195,7 @@ def queue_processor(): response, formatting = mod.process(msg) if response: - if formatting == None: + if not formatting: updater.bot.send_message(chat_id=msg.chat.id, text=response, disable_web_page_preview=True) print(f"Responded using module {mod.path} ({mod.alias}) with text: {response}") diff --git a/module-testing.py b/module-testing.py index 820b976..4a58c1f 100644 --- a/module-testing.py +++ b/module-testing.py @@ -195,7 +195,7 @@ def queue_processor(): response, formatting = mod.process(msg) if response: - if formatting == None: + if not formatting: print(f"Responded using module {mod.path} ({mod.alias}) with text: {response}") break elif formatting in ["Markdown", "MarkdownV2", "HTML"]: