1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-28 05:03:59 +03:00

Include DeviceInfo in deviceVerificationChanged events

... to help the UI update itself
This commit is contained in:
Richard van der Hoff
2017-02-03 14:27:08 +00:00
parent bd4de4832c
commit a3cc8eb1f6
2 changed files with 12 additions and 7 deletions

View File

@@ -418,8 +418,10 @@ function _setDeviceVerification(client, userId, deviceId, verified, blocked, kno
if (!client._crypto) {
throw new Error("End-to-End encryption disabled");
}
client._crypto.setDeviceVerification(userId, deviceId, verified, blocked, known);
client.emit("deviceVerificationChanged", userId, deviceId);
const dev = client._crypto.setDeviceVerification(
userId, deviceId, verified, blocked, known,
);
client.emit("deviceVerificationChanged", userId, deviceId, dev);
}
/**
@@ -3163,6 +3165,7 @@ module.exports.CRYPTO_ENABLED = CRYPTO_ENABLED;
* @event module:client~MatrixClient#"deviceVerificationChanged"
* @param {string} userId the owner of the verified device
* @param {string} deviceId the id of the verified device
* @param {module:crypto/deviceinfo} deviceInfo updated device information
*/
/**