mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-30 11:09:56 +00:00
Fix pubsub get_items.
- item_ids checked for None - pubsub node is set
This commit is contained in:
parent
2500a0649b
commit
cc504ab07c
1 changed files with 6 additions and 4 deletions
|
@ -355,12 +355,14 @@ 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
|
||||||
|
|
||||||
for item_id in item_ids:
|
if item_ids is not None:
|
||||||
item = self.stanza.Item()
|
for item_id in item_ids:
|
||||||
item['id'] = item_id
|
item = self.stanza.Item()
|
||||||
iq['pubsub']['items'].append(item)
|
item['id'] = item_id
|
||||||
|
iq['pubsub']['items'].append(item)
|
||||||
|
|
||||||
if iterator:
|
if iterator:
|
||||||
return self.xmpp['xep_0059'].iterate(iq, 'pubsub')
|
return self.xmpp['xep_0059'].iterate(iq, 'pubsub')
|
||||||
|
|
Loading…
Reference in a new issue