Skip to content

Room history sometimes not visible even when historical room keys are shared. #16983

Closed
matrix-org/matrix-react-sdk
#8563
@uhoreg

Description

@uhoreg

When inviting a user to an E2EE room with history visibility set to allow the new user to view historical messages, we now share (some) decryption keys with the invited user. However, even after doing so, sometimes the new user will see a blank room when they join. They can view the messages after switching to a different room and then switching back.

This is due to matrix-org/matrix-react-sdk#3881, which filters out UTDs from the timeline if they are from before the user joined the room. Thus, if the invited user's Element tries to display the timeline before it receives/processes the keys, it will not try to re-display the undecryptable messages.

I think that we can fix this by modifying https://github.com/matrix-org/matrix-react-sdk/pull/3881/files so that, instead of removing the undecryptable event tiles from the timeline, it just hides them or leaves them blank. When the keys come in, it re-tries the decryption (using the normal decryption re-try mechanism), and if the decryption is successful, then it should back-paginate a few events, and either hide these events and stop back-paginating (if undecryptable), or show them back-paginate more (if decryptable).

Note: I think that this exceeds my React knowledge, so hopefully someone else can pick it up.


You can't see earlier messages

Encrypted messages before this point are unavailable

Metadata

Metadata

Assignees

Labels

A-E2EEO-OccasionalAffects or can be seen by some users regularly or most users rarelyS-MajorSeverely degrades major functionality or product features, with no satisfactory workaroundT-DefectZ-WTF

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions