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:
|
||||
- Added py.typed to the repository for static type checking tools
|
||||
- New delete_session method
|
||||
- New fetch_devices and fetch_bundle methods
|
||||
Version 0.6.1:
|
||||
2022-03-14 Maxime “pep” Buquet <pep@bouah.net>
|
||||
* Improvements:
|
||||
|
|
|
@ -415,7 +415,7 @@ class XEP_0384(BasePlugin):
|
|||
else:
|
||||
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.
|
||||
"""
|
||||
|
@ -435,7 +435,7 @@ class XEP_0384(BasePlugin):
|
|||
else:
|
||||
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
|
||||
"""
|
||||
|
@ -829,10 +829,10 @@ class XEP_0384(BasePlugin):
|
|||
for exn in errors:
|
||||
if isinstance(exn, omemo.exceptions.NoDevicesException):
|
||||
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):
|
||||
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):
|
||||
# On TrustException, there are two possibilities.
|
||||
# Either trust has not been explicitely set yet, and is
|
||||
|
|
Loading…
Reference in a new issue