From c20f4bf5fa4c7391c833be46960760a883e85151 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Sat, 30 Jun 2018 23:05:25 +0100 Subject: [PATCH] xep_0030: Add cached parameter to find_identities, defaults to True MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- slixmpp/plugins/xep_0030/disco.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/slixmpp/plugins/xep_0030/disco.py b/slixmpp/plugins/xep_0030/disco.py index b89c7258..7a682676 100644 --- a/slixmpp/plugins/xep_0030/disco.py +++ b/slixmpp/plugins/xep_0030/disco.py @@ -299,11 +299,11 @@ class XEP_0030(BasePlugin): return self.api['has_identity'](jid, node, ifrom, data) async def find_identities(category, type_, domain=None, timeout=None, - **kwargs): + cached=True, **kwargs): if domain is None: 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( domain, timeout=timeout, **kwargs)] iq_items = await self.get_items(