You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-26 17:03:12 +03:00
use adapter for to_device requests to have same api as for verif over DM
Riot doesn't fully implement to_device verifications, e.g. it doesn't send a `request` but immediately sends a `start` event. Because of this, `crypto.verification.request` doesn't get fired, as that code path doesn't get triggered. This is why MatrixChat in the react-sdk was listening for `crypto.verification.start`. Verification over DM *does* send a `request` event first, so to have the same API for both methods, we fake the request and wrap the verifier in it.
This commit is contained in:
@@ -5201,6 +5201,8 @@ module.exports.CRYPTO_ENABLED = CRYPTO_ENABLED;
|
||||
* @param {object} data
|
||||
* @param {MatrixEvent} data.event the original verification request message
|
||||
* @param {Array} data.methods the verification methods that can be used
|
||||
* @param {Number} data.timeout the amount of milliseconds that should be waited
|
||||
* before cancelling the request automatically.
|
||||
* @param {Function} data.beginKeyVerification a function to call if a key
|
||||
* verification should be performed. The function takes one argument: the
|
||||
* name of the key verification method (taken from data.methods) to use.
|
||||
|
||||
Reference in New Issue
Block a user