diff src/plugins/plugin_xep_0060.py @ 2305:972e33507609

plugin XEP-0060: addManagedNode callbacks now use client syntax instead of profile
author Goffi <goffi@goffi.org>
date Wed, 05 Jul 2017 15:04:43 +0200
parents b5befe7722d3
children 01f0a954d506
line wrap: on
line diff
--- a/src/plugins/plugin_xep_0060.py	Wed Jul 05 15:02:52 2017 +0200
+++ b/src/plugins/plugin_xep_0060.py	Wed Jul 05 15:04:43 2017 +0200
@@ -188,9 +188,9 @@
         @param node(unicode): node to monitor
             all node *prefixed* with this one will be triggered
         @param **kwargs: method(s) to call when the node is found
-            the methode must be named after PubSub constants in lower case
+            the method must be named after PubSub constants in lower case
             and suffixed with "_cb"
-            e.g.: "publish_cb" for C.PS_PUBLISH, "delete_cb" for C.PS_DELETE
+            e.g.: "items_cb" for C.PS_ITEMS, "delete_cb" for C.PS_DELETE
         """
         assert node is not None
         assert kwargs
@@ -792,12 +792,12 @@
     def itemsReceived(self, event):
         log.debug(u"Pubsub items received")
         for callback in self._getNodeCallbacks(event.nodeIdentifier, C.PS_ITEMS):
-            callback(event, self.parent.profile)
+            callback(self.parent, event)
 
     def deleteReceived(self, event):
         log.debug((u"Publish node deleted"))
         for callback in self._getNodeCallbacks(event.nodeIdentifier, C.PS_DELETE):
-            callback(event, self.parent.profile)
+            callback(self.parent, event)
 
     def subscriptions(self, service, nodeIdentifier, sender=None):
         """Return the list of subscriptions to the given service and node.