matrix-org / matrix-rust-sdk

Matrix Client-Server SDK for Rust
Apache License 2.0
1.22k stars 244 forks source link

Update message sender trust status when user's verification state improves #3890

Open andybalaam opened 1 month ago

andybalaam commented 1 month ago

Follow up to https://github.com/matrix-org/matrix-rust-sdk/issues/3544

If a user is in verification violation and then they become verified OR we withdraw verification (making them unverified), update their sessions so messages from them have the updated status.

Current situation

image

image

So in both cases, new messages are displayed correctly. This story is to fix old messages.

This may already be fine on Web, in which case this story is just to fix Element X.

Implementation

andybalaam commented 4 weeks ago

Note for prioritisation: the critical thing here is to make sure future messages do not have shields after we have withdrawn or re-done verification. Updating older messages is a nice to have.

So maybe we can just do this during decryption instead of re-querying for old sessions.