plugin pubsub: fixed redefinition of PubSubRequest
This commit is contained in:
parent
ce8e1dcfc1
commit
fdb50be803
1 changed files with 2 additions and 3 deletions
|
|
@ -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 = []
|
||||
|
|
|
|||
Loading…
Reference in a new issue