From 60badde5a79673c4ac01cfc0f4987d0ec8dd27ff Mon Sep 17 00:00:00 2001 From: fawz Date: Tue, 10 Dec 2019 17:04:11 +0100 Subject: [PATCH] Pass correct type, use full jid explicitly --- slixmpp_omemo/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/slixmpp_omemo/__init__.py b/slixmpp_omemo/__init__.py index 751a35c..144f3a2 100644 --- a/slixmpp_omemo/__init__.py +++ b/slixmpp_omemo/__init__.py @@ -361,8 +361,7 @@ class XEP_0384(BasePlugin): async def _fetch_device_list(self, jid: JID) -> None: """Manually query PEP OMEMO_DEVICES_NS nodes""" - jid = JID(jid) - iq = await self.xmpp['xep_0060'].get_items(jid, OMEMO_DEVICES_NS) + iq = await self.xmpp['xep_0060'].get_items(jid.full, OMEMO_DEVICES_NS) return await self._read_device_list(jid, iq['pubsub']['items']) def _store_device_ids(self, jid: str, items: Union[Items, EventItems]) -> None: @@ -580,7 +579,7 @@ class XEP_0384(BasePlugin): for exn in errors: if isinstance(exn, omemo.exceptions.NoDevicesException): - await self._fetch_device_list(exn.bare_jid) + await self._fetch_device_list(JID(exn.bare_jid)) elif isinstance(exn, omemo.exceptions.MissingBundleException): bundle = await self._fetch_bundle(exn.bare_jid, exn.device) if bundle is not None: