xep_0030: Add cached parameter to find_identities, defaults to True
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
9740e93aeb
commit
c20f4bf5fa
1 changed files with 2 additions and 2 deletions
|
@ -299,11 +299,11 @@ class XEP_0030(BasePlugin):
|
||||||
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):
|
cached=True, **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 not cached or domain not in self.domain_infos:
|
||||||
infos = [self.get_info(
|
infos = [self.get_info(
|
||||||
domain, timeout=timeout, **kwargs)]
|
domain, timeout=timeout, **kwargs)]
|
||||||
iq_items = await self.get_items(
|
iq_items = await self.get_items(
|
||||||
|
|
Loading…
Reference in a new issue