You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2026-01-03 23:22:30 +03:00
Convert sas verification test to callbacks
This commit is contained in:
@@ -69,6 +69,13 @@ export async function makeTestClients(userInfos, options) {
|
||||
};
|
||||
|
||||
for (const userInfo of userInfos) {
|
||||
let keys = {};
|
||||
if (!options) options = {};
|
||||
if (!options.cryptoCallbacks) options.cryptoCallbacks = {};
|
||||
if (!options.cryptoCallbacks.savePrivateKeys) {
|
||||
options.cryptoCallbacks.savePrivateKeys = k => { keys = k; };
|
||||
options.cryptoCallbacks.getPrivateKey = typ => keys[typ];
|
||||
}
|
||||
const testClient = new TestClient(
|
||||
userInfo.userId, userInfo.deviceId, undefined, undefined,
|
||||
options,
|
||||
|
||||
Reference in New Issue
Block a user