1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-29 16:43:09 +03:00

Client: mark our own device as verified

This commit is contained in:
Richard van der Hoff
2016-06-08 16:39:41 +01:00
parent 9feeb0c580
commit 21a62f37de

View File

@@ -130,10 +130,15 @@ function MatrixClient(opts) {
signatures[opts.userId]["ed25519:" + this.deviceId] = signature;
this.deviceKeys.signatures = signatures;
var deviceInfo = {
keys: this.deviceKeys.keys,
algorithms: this.deviceKeys.algorithms,
verified: true,
};
var myDevices = this.sessionStore.getEndToEndDevicesForUser(
opts.userId
) || {};
myDevices[opts.deviceId] = this.deviceKeys;
myDevices[opts.deviceId] = deviceInfo;
this.sessionStore.storeEndToEndDevicesForUser(
opts.userId, myDevices
);