matrix-org / matrix-rust-sdk

Matrix Client-Server SDK for Rust
Apache License 2.0
1.26k stars 246 forks source link

Unwedging doesn't work if wedged session is new, and first one created for device #3427

Open uhoreg opened 5 months ago

uhoreg commented 5 months ago

If

then Bob will try to mark the Alice as wedged, but AFAICT, SessionManager.mark_device_as_wedged won't do anything because it tries to mark a session with Alice as wedged, but there are no existing sessions stored, so nothing can be marked as wedged.

richvdh commented 5 months ago

https://github.com/element-hq/element-meta/issues/2389 will touch this code so that would be a good time to fix it.

richvdh commented 1 month ago

Annoyingly, we did https://github.com/element-hq/element-meta/issues/2389 and seem to have forgotten about this.

richvdh commented 1 month ago

This compounds https://github.com/element-hq/element-meta/issues/2356: if the sender claims a forgotten one-time key, they will keep sending messages using the broken Olm session until the recipient starts a new Olm session.