From bd22a41a783615f415f9f5f6f530b8b2ba226952 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sat, 27 Oct 2018 23:14:39 +0200 Subject: [PATCH] =?UTF-8?q?XEP-0363:=20Also=20check=20for=20disco#info?= =?UTF-8?q?=E2=80=99s=20feature=20instead=20of=20just=20the=20identity.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- slixmpp/plugins/xep_0363/http_upload.py | 5 +++++ 1 file changed, 5 insertions(+) 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,