summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2011-08-31 10:56:43 -0700
committerLance Stout <lancestout@gmail.com>2011-08-31 10:56:43 -0700
commitcc504ab07c984b19a4e959656ffbd657ca80c949 (patch)
tree16187fcb0f7af124697469a546da1b99daf4bdd4 /sleekxmpp/plugins
parent2500a0649ba10c0109a1ed021a051284c104391f (diff)
downloadslixmpp-cc504ab07c984b19a4e959656ffbd657ca80c949.tar.gz
slixmpp-cc504ab07c984b19a4e959656ffbd657ca80c949.tar.bz2
slixmpp-cc504ab07c984b19a4e959656ffbd657ca80c949.tar.xz
slixmpp-cc504ab07c984b19a4e959656ffbd657ca80c949.zip
Fix pubsub get_items.
- item_ids checked for None - pubsub node is set
Diffstat (limited to 'sleekxmpp/plugins')
-rw-r--r--sleekxmpp/plugins/xep_0060/pubsub.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/sleekxmpp/plugins/xep_0060/pubsub.py b/sleekxmpp/plugins/xep_0060/pubsub.py
index 5a17dd56..a891573e 100644
--- a/sleekxmpp/plugins/xep_0060/pubsub.py
+++ b/sleekxmpp/plugins/xep_0060/pubsub.py
@@ -355,12 +355,14 @@ class xep_0060(base_plugin):
many items, so an iterator can be returned if needed.
"""
iq = self.xmpp.Iq(sto=jid, sfrom=ifrom, stype='get')
+ iq['pubsub']['items']['node'] = node
iq['pubsub']['items']['max_items'] = max_items
- for item_id in item_ids:
- item = self.stanza.Item()
- item['id'] = item_id
- iq['pubsub']['items'].append(item)
+ if item_ids is not None:
+ for item_id in item_ids:
+ item = self.stanza.Item()
+ item['id'] = item_id
+ iq['pubsub']['items'].append(item)
if iterator:
return self.xmpp['xep_0059'].iterate(iq, 'pubsub')