This repository was archived by the owner on Sep 11, 2024. It is now read-only.
Show verification requests in the timeline #3601
Merged
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Implements element-hq/element-web#11251
Requires: matrix-org/matrix-js-sdk#1067
This PR implements sending verification requests over direct messages, which can be enabled with the
feature_dm_verification
feature flag. Verification is still initiated through the usualDeviceVerifyDialog
dialog, e.g. by clicking "verify" next to a device in the member info. Reworking that will come in a later PR.During verification, two tiles are shown in the timeline: one for the request (the
m.key.verification.request
event), and one for the conclusion (eitherm.key.verification.cancel
orm.key.verification.done
event), as per the design. All the events have anm.reference
relationship with the first request event (see spec), so I put the code to monitor all of this as events come in inKeyVerificationStateObserver
as both theMKeyVerificationRequest
andMKeyVerificationConclusion
need to be aware of the current state of the request.The styling for both tiles is identical, so I just called the classes
mx_KeyVerification
to share them between the two components for lack of a better idea, even though that doesn't really follow our guidelines. Feel free to suggest a better idea for this.The "bubble" style adds an alternative layout for an event tile, using css grid to overlap the container where the bubble is centered with the timestamp on the left and the read receipts on the right. The bubble doesn't actually visually overlap as it is is centered and has a max-width.