You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-12-01 04:43:29 +03:00
Include DeviceInfo in deviceVerificationChanged events
... to help the UI update itself
This commit is contained in:
@@ -386,6 +386,8 @@ Crypto.prototype.listDeviceKeys = function(userId) {
|
||||
*
|
||||
* @param {?boolean} known whether to mark that the user has been made aware of
|
||||
* the existence of this device. Null to leave unchanged
|
||||
*
|
||||
* @return {module:crypto/deviceinfo} updated DeviceInfo
|
||||
*/
|
||||
Crypto.prototype.setDeviceVerification = function(userId, deviceId, verified,
|
||||
blocked, known) {
|
||||
@@ -414,12 +416,12 @@ Crypto.prototype.setDeviceVerification = function(userId, deviceId, verified,
|
||||
knownStatus = known;
|
||||
}
|
||||
|
||||
if (dev.verified === verificationStatus && dev.known === knownStatus) {
|
||||
return;
|
||||
if (dev.verified !== verificationStatus || dev.known !== knownStatus) {
|
||||
dev.verified = verificationStatus;
|
||||
dev.known = knownStatus;
|
||||
this._sessionStore.storeEndToEndDevicesForUser(userId, devices);
|
||||
}
|
||||
dev.verified = verificationStatus;
|
||||
dev.known = knownStatus;
|
||||
this._sessionStore.storeEndToEndDevicesForUser(userId, devices);
|
||||
return DeviceInfo.fromStorage(dev, deviceId);
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user