You've already forked matrix-js-sdk
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:
@@ -130,10 +130,15 @@ function MatrixClient(opts) {
|
|||||||
signatures[opts.userId]["ed25519:" + this.deviceId] = signature;
|
signatures[opts.userId]["ed25519:" + this.deviceId] = signature;
|
||||||
this.deviceKeys.signatures = signatures;
|
this.deviceKeys.signatures = signatures;
|
||||||
|
|
||||||
|
var deviceInfo = {
|
||||||
|
keys: this.deviceKeys.keys,
|
||||||
|
algorithms: this.deviceKeys.algorithms,
|
||||||
|
verified: true,
|
||||||
|
};
|
||||||
var myDevices = this.sessionStore.getEndToEndDevicesForUser(
|
var myDevices = this.sessionStore.getEndToEndDevicesForUser(
|
||||||
opts.userId
|
opts.userId
|
||||||
) || {};
|
) || {};
|
||||||
myDevices[opts.deviceId] = this.deviceKeys;
|
myDevices[opts.deviceId] = deviceInfo;
|
||||||
this.sessionStore.storeEndToEndDevicesForUser(
|
this.sessionStore.storeEndToEndDevicesForUser(
|
||||||
opts.userId, myDevices
|
opts.userId, myDevices
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user