From 640677437c2706ac25a7f2d3140f7b1fe245d898 Mon Sep 17 00:00:00 2001 From: "Schimon Jehudah, Adv." Date: Mon, 16 Sep 2024 15:20:03 +0300 Subject: [PATCH] Fix error UnboundLocalError (Thank you. mirux). --- slixfeed/version.py | 4 ++-- slixfeed/xmpp/chat.py | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/slixfeed/version.py b/slixfeed/version.py index 292bfaf..29780fb 100644 --- a/slixfeed/version.py +++ b/slixfeed/version.py @@ -1,2 +1,2 @@ -__version__ = '0.1.99' -__version_info__ = (0, 1, 99) +__version__ = '0.1.100' +__version_info__ = (0, 1, 100) diff --git a/slixfeed/xmpp/chat.py b/slixfeed/xmpp/chat.py index 3a2bf31..cb0ff83 100644 --- a/slixfeed/xmpp/chat.py +++ b/slixfeed/xmpp/chat.py @@ -157,9 +157,11 @@ class XmppChat: else: omemo_decrypted = None - # Adding one to the length because of assumption that a comma or a dot is added - alias_of_slixfeed_length = len(alias_of_slixfeed) + 1 - if message_type == 'groupchat': command = (command[alias_of_slixfeed_length:]).lstrip() + if message_type == 'groupchat': + # Adding one to the length because of + # assumption that a comma or a dot is added + alias_of_slixfeed_length = len(alias_of_slixfeed) + 1 + command = (command[alias_of_slixfeed_length:]).lstrip() if isinstance(command, Message): command = command['body'] command_lowercase = command.lower()