Fix pubsub get_items.

- item_ids checked for None
- pubsub node is set
This commit is contained in:
Lance Stout 2011-08-31 10:56:43 -07:00
parent 2500a0649b
commit cc504ab07c

View file

@ -355,8 +355,10 @@ class xep_0060(base_plugin):
many items, so an iterator can be returned if needed. many items, so an iterator can be returned if needed.
""" """
iq = self.xmpp.Iq(sto=jid, sfrom=ifrom, stype='get') iq = self.xmpp.Iq(sto=jid, sfrom=ifrom, stype='get')
iq['pubsub']['items']['node'] = node
iq['pubsub']['items']['max_items'] = max_items iq['pubsub']['items']['max_items'] = max_items
if item_ids is not None:
for item_id in item_ids: for item_id in item_ids:
item = self.stanza.Item() item = self.stanza.Item()
item['id'] = item_id item['id'] = item_id