xep_0030: allow extra args in get_info_from_domain
This commit is contained in:
parent
752f4258df
commit
6940e4276b
1 changed files with 4 additions and 4 deletions
|
@ -307,7 +307,7 @@ class XEP_0030(BasePlugin):
|
||||||
return self.api['has_identity'](jid, node, ifrom, data)
|
return self.api['has_identity'](jid, node, ifrom, data)
|
||||||
|
|
||||||
async def get_info_from_domain(self, domain=None, timeout=None,
|
async def get_info_from_domain(self, domain=None, timeout=None,
|
||||||
cached=True, callback=None):
|
cached=True, callback=None, **iqkwargs):
|
||||||
"""Fetch disco#info of specified domain and one disco#items level below
|
"""Fetch disco#info of specified domain and one disco#items level below
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -316,12 +316,12 @@ class XEP_0030(BasePlugin):
|
||||||
|
|
||||||
if not cached or domain not in self.domain_infos:
|
if not cached or domain not in self.domain_infos:
|
||||||
infos = [self.get_info(
|
infos = [self.get_info(
|
||||||
domain, timeout=timeout)]
|
domain, timeout=timeout, **iqkwargs)]
|
||||||
iq_items = await self.get_items(
|
iq_items = await self.get_items(
|
||||||
domain, timeout=timeout)
|
domain, timeout=timeout, **iqkwargs)
|
||||||
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, **iqkwargs)
|
||||||
for item in items]
|
for item in items]
|
||||||
info_futures, _ = await asyncio.wait(
|
info_futures, _ = await asyncio.wait(
|
||||||
infos,
|
infos,
|
||||||
|
|
Loading…
Reference in a new issue