summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins
diff options
context:
space:
mode:
authorNathan Fritz <nathan@andyet.net>2010-04-23 01:34:28 -0700
committerNathan Fritz <nathan@andyet.net>2010-04-23 01:34:28 -0700
commitc4fa3ab654969a02780cb29508290b1ddd5f1543 (patch)
treedf08049321de63ca40f5c8cc71a6639a90ae62f8 /sleekxmpp/plugins
parente2f841146aba29abf4b99157bb5479c2356f89c5 (diff)
downloadslixmpp-c4fa3ab654969a02780cb29508290b1ddd5f1543.tar.gz
slixmpp-c4fa3ab654969a02780cb29508290b1ddd5f1543.tar.bz2
slixmpp-c4fa3ab654969a02780cb29508290b1ddd5f1543.tar.xz
slixmpp-c4fa3ab654969a02780cb29508290b1ddd5f1543.zip
pubsub test work
Diffstat (limited to 'sleekxmpp/plugins')
-rw-r--r--sleekxmpp/plugins/xep_0060.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/sleekxmpp/plugins/xep_0060.py b/sleekxmpp/plugins/xep_0060.py
index ea75a7d6..44a70e9a 100644
--- a/sleekxmpp/plugins/xep_0060.py
+++ b/sleekxmpp/plugins/xep_0060.py
@@ -172,9 +172,8 @@ class xep_0060(base.base_plugin):
iq.append(pubsub)
iq.attrib['to'] = jid
iq.attrib['from'] = self.xmpp.fulljid
- id = iq['id']
result = iq.send()
- if result is not None and result is not False and result.attrib.get('type', 'error') != 'error':
+ if result is not None and result is not False and result['type'] != 'error':
return True
else:
return False
@@ -216,6 +215,9 @@ class xep_0060(base.base_plugin):
if result is None or result is False or result['type'] == 'error': return False
return True
+ def addItem(self, jid, node, items=[]):
+ return self.setItem(jid, node, items)
+
def deleteItem(self, jid, node, item):
pubsub = ET.Element('{http://jabber.org/protocol/pubsub}pubsub')
retract = ET.Element('retract')
@@ -232,9 +234,6 @@ class xep_0060(base.base_plugin):
if result is None or result is False or result['type'] == 'error': return False
return True
- def addItem(self, jid, node, items=[]):
- return setItem(jid, node, items)
-
def getNodes(self, jid):
response = self.xmpp.plugin['xep_0030'].getItems(jid)
items = response.findall('{http://jabber.org/protocol/disco#items}query/{http://jabber.org/protocol/disco#items}item')