Ensure bundles are republished on decrypt

This would likely do that we had a fixed set of prekeys because we
wouldn't republish after one was used.

This shouldn't have any security implications. Just so that we wouldn't
have been able to initiate new sessions after all published prekeys were
used up, as we don't have the private keys anymore. They are deleted
when used (as should be) by the backend OMEMO library.

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2021-07-13 23:07:06 +02:00
parent af33cd41e5
commit 62fa03959a

View file

@ -608,7 +608,6 @@ class XEP_0384(BasePlugin):
payload,
allow_untrusted=allow_untrusted,
)
return body
except (omemo.exceptions.NoSessionException,):
# This might happen when the sender is sending using a session
# that we don't know about (deleted session storage, etc.). In
@ -624,6 +623,8 @@ class XEP_0384(BasePlugin):
finally:
asyncio.ensure_future(self._publish_bundle())
return body
async def encrypt_message(
self,
plaintext: str,