From afb5419b6820c2d4e256ff1ce2f31e4442dcfe2a Mon Sep 17 00:00:00 2001 From: Nicolas Cedilnik Date: Sat, 18 Jun 2022 06:09:36 +0200 Subject: XEP-0363: Fix upload service auto discovery for components --- 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 4a185fb9..c34be8ff 100644 --- a/slixmpp/plugins/xep_0363/http_upload.py +++ b/slixmpp/plugins/xep_0363/http_upload.py @@ -101,12 +101,17 @@ class XEP_0363(BasePlugin): :param domain: Domain to disco to find a service. """ + if domain is None and self.xmpp.is_component: + domain = self.xmpp.server_host + results = await self.xmpp['xep_0030'].get_info_from_domain( domain=domain, **iqkwargs ) candidates = [] for info in results: + if not info['disco_info']: + continue for identity in info['disco_info']['identities']: if identity[0] == 'store' and identity[1] == 'file': candidates.append(info) -- cgit v1.2.3