From 8e44c07aedefb992d37fef970b3550fe3357713b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Wed, 15 Dec 2021 22:55:03 +0100 Subject: [PATCH] Specify local=False parameter to ['xep_0030'].get_info MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The API here might have changed? It seems this call was going just fine until it wasn't. It was returning an empty string. Adding `local=False` seems to force it to fetch the info remotely and return a proper Iq. Signed-off-by: Maxime “pep” Buquet --- slixmpp_omemo/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/slixmpp_omemo/__init__.py b/slixmpp_omemo/__init__.py index 286ed64..5a9f553 100644 --- a/slixmpp_omemo/__init__.py +++ b/slixmpp_omemo/__init__.py @@ -351,7 +351,7 @@ class XEP_0384(BasePlugin): bundle = self._omemo().public_bundle.serialize(self.omemo_backend) jid = self.xmpp.boundjid - disco = await self.xmpp['xep_0030'].get_info(jid.bare) + disco = await self.xmpp['xep_0030'].get_info(jid=jid.bare, local=False) publish_options = PUBLISH_OPTIONS_NODE in disco['disco_info'].get_features() iq = self.xmpp.Iq(stype='set') @@ -482,7 +482,7 @@ class XEP_0384(BasePlugin): payload['devices'] = devices jid = self.xmpp.boundjid - disco = await self.xmpp['xep_0030'].get_info(jid.bare) + disco = await self.xmpp['xep_0030'].get_info(jid=jid.bare, local=False) publish_options = PUBLISH_OPTIONS_NODE in disco['disco_info'].get_features() options = None