Specify local=False parameter to ['xep_0030'].get_info

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 <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2021-12-15 22:55:03 +01:00
parent 29bf6e8650
commit 8e44c07aed

View file

@ -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