diff options
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2018-10-27 23:14:39 +0200 |
---|---|---|
committer | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2018-10-27 23:14:39 +0200 |
commit | bd22a41a783615f415f9f5f6f530b8b2ba226952 (patch) | |
tree | 2acb211789ddb7d7c72d5e7830545b85156464fc | |
parent | a29a29227a1a2ed1c45797e39495c9e2c26c7bff (diff) | |
download | slixmpp-bd22a41a783615f415f9f5f6f530b8b2ba226952.tar.gz slixmpp-bd22a41a783615f415f9f5f6f530b8b2ba226952.tar.bz2 slixmpp-bd22a41a783615f415f9f5f6f530b8b2ba226952.tar.xz slixmpp-bd22a41a783615f415f9f5f6f530b8b2ba226952.zip |
XEP-0363: Also check for disco#info’s feature instead of just the identity.
-rw-r--r-- | slixmpp/plugins/xep_0363/http_upload.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/slixmpp/plugins/xep_0363/http_upload.py b/slixmpp/plugins/xep_0363/http_upload.py index b39757ae..77ccfc01 100644 --- a/slixmpp/plugins/xep_0363/http_upload.py +++ b/slixmpp/plugins/xep_0363/http_upload.py @@ -72,9 +72,14 @@ class XEP_0363(BasePlugin): domain=domain, timeout=timeout, timeout_callback=timeout_callback) + candidates = [] for info in results: for identity in info['disco_info']['identities']: if identity[0] == 'store' and identity[1] == 'file': + candidates.append(info) + for info in candidates: + for feature in info['disco_info']['features']: + if feature == Request.namespace: return info def request_slot(self, jid, filename, size, content_type=None, ifrom=None, |