Mercurial > libervia-backend
changeset 1775:0876352459e5
plugin XEP-0277: ignore maxItems if it is null
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 05 Jan 2016 23:20:22 +0100 |
parents | 0c21dafedd22 |
children | 4fc1bf1af48f |
files | src/plugins/plugin_xep_0277.py |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/plugins/plugin_xep_0277.py Tue Jan 05 23:20:22 2016 +0100 +++ b/src/plugins/plugin_xep_0277.py Tue Jan 05 23:20:22 2016 +0100 @@ -543,7 +543,7 @@ """ max_items = None if max_items == C.NO_LIMIT else max_items extra = self._p.parseExtra(extra_dict) - return self.mbGet(jid.JID(service_jid_s), node or None, max_items, item_ids, extra.rsm_request, extra.extra, profile_key) + return self.mbGet(jid.JID(service_jid_s), node or None, max_items or None, item_ids, extra.rsm_request, extra.extra, profile_key) @defer.inlineCallbacks def mbGet(self, service_jid, node=None, max_items=None, item_ids=None, rsm_request=None, extra=None, profile_key=C.PROF_KEY_NONE): @@ -742,7 +742,7 @@ max_items = None if max_items == C.NO_LIMIT else max_items publishers_type, publishers = self._checkPublishers(publishers_type, publishers) extra = self._p.parseExtra(extra_dict) - return self.mbGetFromMany(publishers_type, publishers, max_items, extra.rsm_request, extra.extra, profile_key) + return self.mbGetFromMany(publishers_type, publishers, max_items or None, extra.rsm_request, extra.extra, profile_key) def mbGetFromMany(self, publishers_type, publishers, max_items=None, rsm_request=None, extra=None, profile_key=C.PROF_KEY_NONE): """Get the published microblogs for a list of groups or jids @@ -799,7 +799,7 @@ publishers_type, publishers = self._checkPublishers(publishers_type, publishers) extra = self._p.parseExtra(extra_dict) extra_comments = self._p.parseExtra(extra_comments_dict) - return self.mbGetFromManyWithComments(publishers_type, publishers, max_items, max_comments, + return self.mbGetFromManyWithComments(publishers_type, publishers, max_items or None, max_comments, extra.rsm_request, extra.extra, extra_comments.rsm_request, @@ -889,7 +889,7 @@ """ max_items = None if max_items == C.NO_LIMIT else max_items extra = self._p.parseExtra(extra_dict) - return self.mbGetAtom(jid.JID(service_jid_s), node or None, max_items, item_ids, extra.rsm_request, extra.extra, profile_key) + return self.mbGetAtom(jid.JID(service_jid_s), node or None, max_items or None, item_ids, extra.rsm_request, extra.extra, profile_key) @defer.inlineCallbacks def mbGetAtom(self, service_jid, node=None, max_items=None, item_ids=None, rsm_request=None, extra=None, profile_key=C.PROF_KEY_NONE):