plugin pubsub: fixed redefinition of PubSubRequest

This commit is contained in:
Goffi 2014-11-21 16:36:24 +01:00
commit fdb50be803

View file

@ -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 = []