diff options
author | Maxime “pep” Buquet <pep@bouah.net> | 2018-07-01 01:36:26 +0100 |
---|---|---|
committer | Maxime “pep” Buquet <pep@bouah.net> | 2018-07-01 01:36:26 +0100 |
commit | caae713dd63a045e28260df962e97e98fb1c0a3a (patch) | |
tree | c5d10470dbb97e479e1c027edd3d211f5582dd08 /slixmpp/plugins/xep_0030 | |
parent | df0198abfee83b2a070a7cc2f1a543837189a4c5 (diff) | |
download | slixmpp-caae713dd63a045e28260df962e97e98fb1c0a3a.tar.gz slixmpp-caae713dd63a045e28260df962e97e98fb1c0a3a.tar.bz2 slixmpp-caae713dd63a045e28260df962e97e98fb1c0a3a.tar.xz slixmpp-caae713dd63a045e28260df962e97e98fb1c0a3a.zip |
xep_0030: rename find_identities; return all domain infos and let caller filter itself
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
Diffstat (limited to 'slixmpp/plugins/xep_0030')
-rw-r--r-- | slixmpp/plugins/xep_0030/disco.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/slixmpp/plugins/xep_0030/disco.py b/slixmpp/plugins/xep_0030/disco.py index f16d36d2..ea9a33f4 100644 --- a/slixmpp/plugins/xep_0030/disco.py +++ b/slixmpp/plugins/xep_0030/disco.py @@ -298,8 +298,8 @@ class XEP_0030(BasePlugin): 'cached': cached} return self.api['has_identity'](jid, node, ifrom, data) - async def find_identities(category, type_, domain=None, timeout=None, - cached=True, callback=None, **kwargs): + async def get_info_from_domain(self, domain=None, timeout=None, + cached=True, callback=None, **kwargs): if domain is None: domain = self.xmpp.boundjid.domain @@ -317,11 +317,7 @@ class XEP_0030(BasePlugin): self.domain_infos[domain] = [ future.result() for future in info_futures] - results = [] - for info in self.domain_infos[domain]: - for identity in info['disco_info']['identities']: - if identity[0] == category and identity[1] == type_: - results.append(info) + results = self.domain_infos[domain] if callback is not None: callback(results) |