comparison 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
comparison
equal deleted inserted replaced
3590:1269c2d788be 3591:d830c11eeef3
954 954
955 @param service(jid.JID, None): jid of the publisher 955 @param service(jid.JID, None): jid of the publisher
956 None to get profile's PEP 956 None to get profile's PEP
957 @param node(unicode, None): node to get (or microblog node if None) 957 @param node(unicode, None): node to get (or microblog node if None)
958 @param max_items(int): maximum number of item to get, None for no limit 958 @param max_items(int): maximum number of item to get, None for no limit
959 ignored if rsm_request is set
959 @param item_ids (list[unicode]): list of item IDs 960 @param item_ids (list[unicode]): list of item IDs
960 @param rsm_request (rsm.RSMRequest): RSM request data 961 @param rsm_request (rsm.RSMRequest): RSM request data
961 @param extra (dict): extra data 962 @param extra (dict): extra data
962 963
963 @return: a deferred couple with the list of items and metadatas. 964 @return: a deferred couple with the list of items and metadatas.
964 """ 965 """
965 if node is None: 966 if node is None:
966 node = NS_MICROBLOG 967 node = NS_MICROBLOG
968 if rsm_request:
969 max_items = None
967 items_data = await self._p.getItems( 970 items_data = await self._p.getItems(
968 client, 971 client,
969 service, 972 service,
970 node, 973 node,
971 max_items=max_items, 974 max_items=max_items,