summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime “pep” Buquet <pep@bouah.net>2018-07-01 01:32:00 +0100
committerMaxime “pep” Buquet <pep@bouah.net>2018-07-01 01:32:00 +0100
commitdf0198abfee83b2a070a7cc2f1a543837189a4c5 (patch)
tree4fa81e382e0793e54fdc8e0d9658e4a31548b181
parentc20f4bf5fa4c7391c833be46960760a883e85151 (diff)
downloadslixmpp-df0198abfee83b2a070a7cc2f1a543837189a4c5.tar.gz
slixmpp-df0198abfee83b2a070a7cc2f1a543837189a4c5.tar.bz2
slixmpp-df0198abfee83b2a070a7cc2f1a543837189a4c5.tar.xz
slixmpp-df0198abfee83b2a070a7cc2f1a543837189a4c5.zip
xep_0030: Add callback parameter to find_identities
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
-rw-r--r--slixmpp/plugins/xep_0030/disco.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/slixmpp/plugins/xep_0030/disco.py b/slixmpp/plugins/xep_0030/disco.py
index 7a682676..f16d36d2 100644
--- a/slixmpp/plugins/xep_0030/disco.py
+++ b/slixmpp/plugins/xep_0030/disco.py
@@ -299,7 +299,7 @@ class XEP_0030(BasePlugin):
return self.api['has_identity'](jid, node, ifrom, data)
async def find_identities(category, type_, domain=None, timeout=None,
- cached=True, **kwargs):
+ cached=True, callback=None, **kwargs):
if domain is None:
domain = self.xmpp.boundjid.domain
@@ -322,6 +322,9 @@ class XEP_0030(BasePlugin):
for identity in info['disco_info']['identities']:
if identity[0] == category and identity[1] == type_:
results.append(info)
+
+ if callback is not None:
+ callback(results)
return results
@future_wrapper