mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-16 20:49:05 -04:00
Usually it's impossible to create a Olm session from a pre-key message twice. The one-time key that should be used for the 3DH step will be used up and we're going to throw a `MissingOneTimeKey` error. This used to be true and unproblematic until we added fallback keys, these keys will not get discarded immediately after they have been used once. This means that a pre-key message, for which we already have a Session, but decryption for it fails, might create a new Session overwriting the existing one which will essentially reset the ratchet.