Closed richvdh closed 6 months ago
Background: If an Olm session "wedges", we will attempt to work around it by starting a new session. Later, when either side wants to send another olm message, it will use the most recent Olm session -- ie, the new session.
However: when sessions are imported from legacy crypto, their "creation_time" and "last_used_time" are both set 50000 years in the future. (They are set in milliseconds rather than seconds. See also https://github.com/matrix-org/matrix-rust-sdk/issues/2974, https://github.com/matrix-org/matrix-rust-sdk/issues/2973.) That means that the imported session will always be used in preference to any newer sessions.
Turns out iOS does this right, actually.
Background: If an Olm session "wedges", we will attempt to work around it by starting a new session. Later, when either side wants to send another olm message, it will use the most recent Olm session -- ie, the new session.
However: when sessions are imported from legacy crypto, their "creation_time" and "last_used_time" are both set 50000 years in the future. (They are set in milliseconds rather than seconds. See also https://github.com/matrix-org/matrix-rust-sdk/issues/2974, https://github.com/matrix-org/matrix-rust-sdk/issues/2973.) That means that the imported session will always be used in preference to any newer sessions.