modules/CommandJoinActive.py
authorSomeone <someone@somenet.org>
Fri, 18 Mar 2022 20:32:47 +0000 (21:32 +0100)
committerSomeone <someone@somenet.org>
Fri, 18 Mar 2022 20:32:47 +0000 (21:32 +0100)
modules/CommandJoinActive.py

index 93df3666f47c9bb7322b6fa4b01cbb27c8b3e6bf..172b3afac3e9c08030300334b9a21a697e268c75 100644 (file)
@@ -79,7 +79,7 @@ class CommandJoinActive(AbstractCommand):
         msg = ""
         for chan in self.bot.api.get_team_channels(self.TEAM_ID):
             #check against ban list and get the last 10 posts, if all of them are newer than min_timestamp: join
-            if not chan["id"] in self.skip_chann_ids and self.channel_index[chan["id"]] > timestamp:
+            if chan["id"] not in self.channel_index and chan["id"] not in self.skip_chann_ids and self.channel_index[chan["id"]] > timestamp:
                 self.bot.api.add_user_to_channel(chan["id"], data["user_id"])
                 msg += "\n + ~"+chan["name"]