matrix-rust-sdk icon indicating copy to clipboard operation
matrix-rust-sdk copied to clipboard

Multiple Olm Session: should use the session from which it last received and successfully decrypted a message

Open BillCarsonFr opened this issue 7 months ago • 0 comments

As per spec:

If a client has multiple sessions established with another device, it should use the session from which it last received and successfully decrypted a message. For these purposes, a session that has not received any messages should use its creation time as the time that it last received a message.

But currently, olm sessions are only ordered by creation_time; https://github.com/matrix-org/matrix-rust-sdk/blob/75fe874cae8424ec09a869b62ed6719115eaa91a/crates/matrix-sdk-crypto/src/identities/device.rs#L643-L651

BillCarsonFr avatar Dec 22 '23 08:12 BillCarsonFr