]> kaliko git repositories - sid.git/commitdiff
rtbl: Fixed rtbl_ban call
authorkaliko <kaliko@azylum.org>
Tue, 21 Mar 2023 21:53:45 +0000 (22:53 +0100)
committerkaliko <kaliko@azylum.org>
Tue, 21 Mar 2023 21:53:45 +0000 (22:53 +0100)
sid/rtbl.py

index 13e5c91332fcb485afea779cd092f4457a1dc783..e5e4e6f933e1fbd093380a36f0a05e34d2a0fa42 100644 (file)
@@ -108,6 +108,9 @@ class RTBL(Plugin):
         self.blocklist = BL(node_blocklist['pubsub']['items'])
         mess = f'Got {len(self.blocklist)} items in block list'
         self.log.info(mess)
+        # Are current participants in the block list
+        for jid in list(self.participants):
+            await self.rtbl_ban(jid)
 
     async def _create(self):
         """Try to create node"""
@@ -138,8 +141,8 @@ class RTBL(Plugin):
             return
         self.blocklist.insert_item(msg['pubsub_event']['items']['item']['id'])
         # Are current participants in the block list
-        for jid in self.participants:
-            self.rtbl_ban(jid)
+        for jid in list(self.participants):
+            await self.rtbl_ban(jid)
 
     async def rtbl_ban(self, jid):
         """Ban jid in RTBL"""