From fdb50be803201dff3d3c52ae2560b173a421b13a Mon Sep 17 00:00:00 2001 From: Goffi Date: Fri, 21 Nov 2014 16:36:24 +0100 Subject: [PATCH] plugin pubsub: fixed redefinition of PubSubRequest --- src/plugins/plugin_xep_0060.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/plugins/plugin_xep_0060.py b/src/plugins/plugin_xep_0060.py index 5d28a9be..f7dce78d 100755 --- a/src/plugins/plugin_xep_0060.py +++ b/src/plugins/plugin_xep_0060.py @@ -25,7 +25,6 @@ from sat.memory.memory import Sessions from wokkel.compat import IQ from wokkel import disco, pubsub -from wokkel.pubsub import PubSubRequest, NS_PUBSUB from zope.interface import implements from twisted.internet import defer @@ -286,7 +285,7 @@ class SatPubSubClient(pubsub.PubSubClient): def cb(iq): items = [] for element in iq.pubsub.items.elements(): - if element.uri == NS_PUBSUB and element.name == 'item': + if element.uri == pubsub.NS_PUBSUB and element.name == 'item': items.append(element) # TODO: return (items, self.host.plugins['XEP-0059'].extractMetadata(iq)) ?? return items @@ -342,7 +341,7 @@ class SatPubSubClient(pubsub.PubSubClient): request.sender = sender iq = yield request.send(self.xmlstream) defer.returnValue([sub for sub in iq.pubsub.subscriptions.elements() if - (sub.uri == NS_PUBSUB and sub.name == 'subscription')]) + (sub.uri == pubsub.NS_PUBSUB and sub.name == 'subscription')]) def getDiscoInfo(self, requestor, service, nodeIdentifier=''): disco_info = []