changeset 1260:c8cf61c6d238

plugin pubsub: fixed redefinition of PubSubRequest
author Goffi <goffi@goffi.org>
date Fri, 21 Nov 2014 16:36:24 +0100
parents 633fcd13a7dc
children 93bce9e4c9c8
files src/plugins/plugin_xep_0060.py
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/plugins/plugin_xep_0060.py	Fri Nov 21 16:35:40 2014 +0100
+++ b/src/plugins/plugin_xep_0060.py	Fri Nov 21 16:36:24 2014 +0100
@@ -25,7 +25,6 @@
 
 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 @@
         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 @@
         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 = []