Mercurial > libervia-backend
diff src/plugins/plugin_xep_0277.py @ 1760:30efe084471c
plugin XEP-0060: None is no more used in addManagedNode, but all nodes prefixed with a registered one are now triggered
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 18 Dec 2015 15:06:58 +0100 |
parents | 6fd0881fe1fc |
children | d17772b0fe22 |
line wrap: on
line diff
--- a/src/plugins/plugin_xep_0277.py Thu Dec 17 22:38:00 2015 +0100 +++ b/src/plugins/plugin_xep_0277.py Fri Dec 18 15:06:58 2015 +0100 @@ -72,7 +72,7 @@ self.host = host self._p = self.host.plugins["XEP-0060"] # this facilitate the access to pubsub plugin self.rt_sessions = sat_defer.RTDeferredSessions() - self.host.plugins["XEP-0060"].addManagedNode(None, items_cb=self._itemsReceived) + self.host.plugins["XEP-0060"].addManagedNode(NS_MICROBLOG, items_cb=self._itemsReceived) host.bridge.addMethod("mbSend", ".plugin", in_sign='ssa{ss}s', out_sign='', @@ -120,8 +120,6 @@ def _itemsReceived(self, itemsEvent, profile): """Callback which manage items notifications (publish + retract)""" - if not itemsEvent.nodeIdentifier.startswith(NS_MICROBLOG): - return def manageItem(data, event): self.host.bridge.psEvent(C.PS_MICROBLOG, itemsEvent.sender.full(), itemsEvent.nodeIdentifier, event, data, profile)