diff sat/plugins/plugin_xep_0277.py @ 3591:d830c11eeef3

plugin XEP-0277: ignore `max_items` if `rsm_request` is set
author Goffi <goffi@goffi.org>
date Thu, 29 Jul 2021 21:28:48 +0200
parents 5f65f4e9f8cb
children d390ff50af0f
line wrap: on
line diff
--- a/sat/plugins/plugin_xep_0277.py	Thu Jul 29 17:28:02 2021 +0200
+++ b/sat/plugins/plugin_xep_0277.py	Thu Jul 29 21:28:48 2021 +0200
@@ -956,6 +956,7 @@
             None to get profile's PEP
         @param node(unicode, None): node to get (or microblog node if None)
         @param max_items(int): maximum number of item to get, None for no limit
+            ignored if rsm_request is set
         @param item_ids (list[unicode]): list of item IDs
         @param rsm_request (rsm.RSMRequest): RSM request data
         @param extra (dict): extra data
@@ -964,6 +965,8 @@
         """
         if node is None:
             node = NS_MICROBLOG
+        if rsm_request:
+            max_items = None
         items_data = await self._p.getItems(
             client,
             service,