Pass correct type, use full jid explicitly
This commit is contained in:
parent
9f1f538d78
commit
60badde5a7
1 changed files with 2 additions and 3 deletions
|
@ -361,8 +361,7 @@ class XEP_0384(BasePlugin):
|
||||||
|
|
||||||
async def _fetch_device_list(self, jid: JID) -> None:
|
async def _fetch_device_list(self, jid: JID) -> None:
|
||||||
"""Manually query PEP OMEMO_DEVICES_NS nodes"""
|
"""Manually query PEP OMEMO_DEVICES_NS nodes"""
|
||||||
jid = JID(jid)
|
iq = await self.xmpp['xep_0060'].get_items(jid.full, OMEMO_DEVICES_NS)
|
||||||
iq = await self.xmpp['xep_0060'].get_items(jid, OMEMO_DEVICES_NS)
|
|
||||||
return await self._read_device_list(jid, iq['pubsub']['items'])
|
return await self._read_device_list(jid, iq['pubsub']['items'])
|
||||||
|
|
||||||
def _store_device_ids(self, jid: str, items: Union[Items, EventItems]) -> None:
|
def _store_device_ids(self, jid: str, items: Union[Items, EventItems]) -> None:
|
||||||
|
@ -580,7 +579,7 @@ class XEP_0384(BasePlugin):
|
||||||
|
|
||||||
for exn in errors:
|
for exn in errors:
|
||||||
if isinstance(exn, omemo.exceptions.NoDevicesException):
|
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):
|
elif isinstance(exn, omemo.exceptions.MissingBundleException):
|
||||||
bundle = await self._fetch_bundle(exn.bare_jid, exn.device)
|
bundle = await self._fetch_bundle(exn.bare_jid, exn.device)
|
||||||
if bundle is not None:
|
if bundle is not None:
|
||||||
|
|
Loading…
Reference in a new issue