]> us-delaporte.pagekite.me Git - matrix-goal-bot.git/blobdiff - matrix_goal_bot/bot.py
Fix for task removal
[matrix-goal-bot.git] / matrix_goal_bot / bot.py
index 417fca92eb93d99afa23238035b8d7e41a436a21..47c71a365b46e8a2e646fd9515881c991b6335d1 100644 (file)
@@ -71,13 +71,13 @@ class GoalBot():
         self.bot.run()
 
     async def handle_message(self, room, message):
-        logger.debug(f'Message: {message}')
         match = botlib.MessageMatch(room, message, self.bot, self.prefix)
 
-        if not match.is_not_from_this_bot() and match.prefix():
-            logger.debug(f'Message: {message} was not for this bot.')
+        if not match.is_not_from_this_bot():
+            # Let's not talk to our-self
             return
 
+        logger.debug(f'Message: {message}')
         if not match.prefix():
             logger.debug(f'{message} - did not match {self.prefix}')