diff --git a/CHANGELOG.md b/CHANGELOG.md index 1dd4dd8..4b66edc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +### 0.5.11 + +* fix message processing + ### 0.5.10 * fix bot without mongo_url diff --git a/bot/bot.py b/bot/bot.py index a23eb90..a327796 100644 --- a/bot/bot.py +++ b/bot/bot.py @@ -124,7 +124,11 @@ def _process_message(self, message): chat = Chat.from_message(self, message) - if "text" in message and message["from"]["id"] in self.moderators: + if ( + "text" in message + and "from" in message + and message["from"]["id"] in self.moderators + ): for patterns, handler in self._moderators_commands: m = re.search(patterns, message["text"], re.I) if m: