Closed richvdh closed 3 days ago
This is tracked on the EXA and EXI repos as https://github.com/element-hq/element-x-android/issues/3234 and https://github.com/element-hq/element-x-ios/issues/3055 respectively
If the user paginates in the room, the received paginated messages get decrypted in the timeline. The 20-30 last messages on the room stay UTDs but previous messages are decrypted.
Since client side sorting, we have a mechanism to prefill the room timeline from the room list by subscribing to each displayed rooms. The decryption retries may fail in this condition or they succeed but we fail to notify the UI of the timeline.
I think it's rather that events are received before the backup becomes active, and the timeline doesn't listen for the backup becoming active.
It should listen to the backup becoming active and retry the decryption of all events, since we download room keys on demand, i.e. when we fail to decrypt a event.
Relevant code should be here:
Steps to reproduce
Sign into a new instance of Element X Verify your device Open some chats with historic E2EE message, those messages can appear as UTDs Clear EX cache in developer settings All historic messages are now decrypted properly
Outcome
What did you expect?
Historic messages decrypt successfully, and are displayed as such, without having to cache reload.
What happened instead?
Historic messages that are shown as UTDs in the timeline seem stuck that way indefinitely. It could be that the keys are being downloaded or processed at the same time as a user trying to open the message, EX is unable to show the message and presents it as a UTD, and subsequently doesn't attempt to decrypt the message again in future.