XEP-0363: Also check for disco#info’s feature instead of just the identity.
This commit is contained in:
parent
a29a29227a
commit
bd22a41a78
@ -72,9 +72,14 @@ class XEP_0363(BasePlugin):
|
|||||||
domain=domain,
|
domain=domain,
|
||||||
timeout=timeout, timeout_callback=timeout_callback)
|
timeout=timeout, timeout_callback=timeout_callback)
|
||||||
|
|
||||||
|
candidates = []
|
||||||
for info in results:
|
for info in results:
|
||||||
for identity in info['disco_info']['identities']:
|
for identity in info['disco_info']['identities']:
|
||||||
if identity[0] == 'store' and identity[1] == 'file':
|
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
|
return info
|
||||||
|
|
||||||
def request_slot(self, jid, filename, size, content_type=None, ifrom=None,
|
def request_slot(self, jid, filename, size, content_type=None, ifrom=None,
|
||||||
|
Loading…
Reference in New Issue
Block a user