Don't expose fetch_devices and fetch_bundle
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
882b4d2294
commit
7324193966
2 changed files with 4 additions and 5 deletions
|
@ -8,7 +8,6 @@ Version XXX:
|
||||||
* Improvements:
|
* Improvements:
|
||||||
- Added py.typed to the repository for static type checking tools
|
- Added py.typed to the repository for static type checking tools
|
||||||
- New delete_session method
|
- New delete_session method
|
||||||
- New fetch_devices and fetch_bundle methods
|
|
||||||
Version 0.6.1:
|
Version 0.6.1:
|
||||||
2022-03-14 Maxime “pep” Buquet <pep@bouah.net>
|
2022-03-14 Maxime “pep” Buquet <pep@bouah.net>
|
||||||
* Improvements:
|
* Improvements:
|
||||||
|
|
|
@ -415,7 +415,7 @@ class XEP_0384(BasePlugin):
|
||||||
else:
|
else:
|
||||||
log.debug('Not publishing.')
|
log.debug('Not publishing.')
|
||||||
|
|
||||||
async def fetch_bundle(self, jid: JID, device_id: int) -> None:
|
async def _fetch_bundle(self, jid: JID, device_id: int) -> None:
|
||||||
"""
|
"""
|
||||||
Fetch bundles for specified jid / device_id pair.
|
Fetch bundles for specified jid / device_id pair.
|
||||||
"""
|
"""
|
||||||
|
@ -435,7 +435,7 @@ class XEP_0384(BasePlugin):
|
||||||
else:
|
else:
|
||||||
log.debug('Encryption: Bundle %r not found!', device_id)
|
log.debug('Encryption: Bundle %r not found!', device_id)
|
||||||
|
|
||||||
async def fetch_devices(self, jid: JID) -> None:
|
async def _fetch_devices(self, jid: JID) -> None:
|
||||||
"""
|
"""
|
||||||
Manually query PEP OMEMO_DEVICES_NS nodes
|
Manually query PEP OMEMO_DEVICES_NS nodes
|
||||||
"""
|
"""
|
||||||
|
@ -829,10 +829,10 @@ class XEP_0384(BasePlugin):
|
||||||
for exn in errors:
|
for exn in errors:
|
||||||
if isinstance(exn, omemo.exceptions.NoDevicesException):
|
if isinstance(exn, omemo.exceptions.NoDevicesException):
|
||||||
log.debug('Encryption: Missing device list for JID: %r', exn.bare_jid)
|
log.debug('Encryption: Missing device list for JID: %r', exn.bare_jid)
|
||||||
await self.fetch_devices(JID(exn.bare_jid))
|
await self._fetch_devices(JID(exn.bare_jid))
|
||||||
elif isinstance(exn, omemo.exceptions.MissingBundleException):
|
elif isinstance(exn, omemo.exceptions.MissingBundleException):
|
||||||
log.debug('Encryption: Missing bundle for JID: %r, device: %r', exn.bare_jid, exn.device)
|
log.debug('Encryption: Missing bundle for JID: %r, device: %r', exn.bare_jid, exn.device)
|
||||||
await self.fetch_bundle(JID(exn.bare_jid), exn.device)
|
await self._fetch_bundle(JID(exn.bare_jid), exn.device)
|
||||||
elif isinstance(exn, omemo.exceptions.TrustException):
|
elif isinstance(exn, omemo.exceptions.TrustException):
|
||||||
# On TrustException, there are two possibilities.
|
# On TrustException, there are two possibilities.
|
||||||
# Either trust has not been explicitely set yet, and is
|
# Either trust has not been explicitely set yet, and is
|
||||||
|
|
Loading…
Reference in a new issue