xep_0384: republish our bundle after decryption if necessary

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2018-12-01 18:39:00 +00:00
parent 4b565c0f7b
commit a8fb31a4b1

View file

@ -314,6 +314,8 @@ class XEP_0384(BasePlugin):
# TODO: get ahold of bare_jid and device_id to pass in the
# exception.
raise NoAvailableSession
finally:
asyncio.ensure_future(self._publish_bundle())
def _fetching_bundle(self, jid: str, exn: Exception, key: str, _val: Any) -> bool:
return isinstance(exn, omemo.exceptions.MissingBundleException) and key == jid