xep_0030: Pass kwargs down in find_identities

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2018-06-30 23:03:47 +01:00
parent e7872aaa29
commit 9740e93aeb

View file

@ -298,18 +298,19 @@ class XEP_0030(BasePlugin):
'cached': cached} 'cached': cached}
return self.api['has_identity'](jid, node, ifrom, data) return self.api['has_identity'](jid, node, ifrom, data)
async def find_identities(category, type_, domain=None, timeout=None): async def find_identities(category, type_, domain=None, timeout=None,
**kwargs):
if domain is None: if domain is None:
domain = self.xmpp.boundjid.domain domain = self.xmpp.boundjid.domain
if domain not in self.domain_infos: if domain not in self.domain_infos:
infos = [self.get_info( infos = [self.get_info(
domain, timeout=timeout)] domain, timeout=timeout, **kwargs)]
iq_items = await self.get_items( iq_items = await self.get_items(
domain, timeout=timeout) domain, timeout=timeout, **kwargs)
items = iq_items['disco_items']['items'] items = iq_items['disco_items']['items']
infos += [ infos += [
self.get_info(item[0], timeout=timeout) self.get_info(item[0], timeout=timeout, **kwargs)
for item in items] for item in items]
info_futures, _ = await asyncio.wait(infos, timeout=timeout) info_futures, _ = await asyncio.wait(infos, timeout=timeout)