]> kaliko git repositories - sid.git/commitdiff
rtbl: Fixed publish/retract item
authorkaliko <kaliko@azylum.org>
Wed, 22 Mar 2023 16:43:12 +0000 (17:43 +0100)
committerkaliko <kaliko@azylum.org>
Wed, 22 Mar 2023 16:43:12 +0000 (17:43 +0100)
sid/rtbl.py

index e5e4e6f933e1fbd093380a36f0a05e34d2a0fa42..0ea3bbbf36a8be446305595d36eeac78501e5795 100644 (file)
@@ -126,7 +126,7 @@ class RTBL(Plugin):
         self.log.debug('Retracted item %s from %s' % (
             msg['pubsub_event']['items']['retract']['id'],
             msg['pubsub_event']['items']['node']))
-        self.blocklist.retract_item(msg['pubsub_event']['items']['retract']['id'])
+        self.blocklist.retract_item(msg['pubsub_event']['items']['retract'])
 
     async def _publish(self, msg):
         """Handler receiving a publish item event."""
@@ -139,7 +139,7 @@ class RTBL(Plugin):
         else:
             self.log.debug('No item content')
             return
-        self.blocklist.insert_item(msg['pubsub_event']['items']['item']['id'])
+        self.blocklist.insert_item(msg['pubsub_event']['items']['item'])
         # Are current participants in the block list
         for jid in list(self.participants):
             await self.rtbl_ban(jid)