You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-25 05:23:13 +03:00
some cleanups
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
import expect from 'expect';
|
import expect from 'expect';
|
||||||
import Promise from 'bluebird';
|
import Promise from 'bluebird';
|
||||||
const logger = require("../lib/logger");
|
|
||||||
|
|
||||||
// load olm before the sdk if possible
|
// load olm before the sdk if possible
|
||||||
import './olm-loader';
|
import './olm-loader';
|
||||||
|
|||||||
@@ -67,8 +67,6 @@ describe("Cross Signing", function() {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
verified: 0,
|
|
||||||
unsigned: {},
|
|
||||||
});
|
});
|
||||||
// Alice verifies Bob's key
|
// Alice verifies Bob's key
|
||||||
alice.on("cross-signing:getKey", function(e) {
|
alice.on("cross-signing:getKey", function(e) {
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ limitations under the License.
|
|||||||
import '../../olm-loader';
|
import '../../olm-loader';
|
||||||
|
|
||||||
import expect from 'expect';
|
import expect from 'expect';
|
||||||
import anotherjson from 'another-json';
|
|
||||||
import { MatrixEvent } from '../../../lib/models/event';
|
import { MatrixEvent } from '../../../lib/models/event';
|
||||||
|
|
||||||
import olmlib from '../../../lib/crypto/olmlib';
|
import olmlib from '../../../lib/crypto/olmlib';
|
||||||
@@ -25,8 +24,6 @@ import olmlib from '../../../lib/crypto/olmlib';
|
|||||||
import TestClient from '../../TestClient';
|
import TestClient from '../../TestClient';
|
||||||
import { makeTestClients } from './verification/util';
|
import { makeTestClients } from './verification/util';
|
||||||
|
|
||||||
import {HttpResponse, setHttpResponses} from '../../test-utils';
|
|
||||||
|
|
||||||
async function makeTestClient(userInfo, options) {
|
async function makeTestClient(userInfo, options) {
|
||||||
const client = (new TestClient(
|
const client = (new TestClient(
|
||||||
userInfo.userId, userInfo.deviceId, undefined, undefined, options,
|
userInfo.userId, userInfo.deviceId, undefined, undefined, options,
|
||||||
|
|||||||
@@ -1047,7 +1047,7 @@ Crypto.prototype.setDeviceVerification = async function(
|
|||||||
userId, deviceId, verified, blocked, known,
|
userId, deviceId, verified, blocked, known,
|
||||||
) {
|
) {
|
||||||
const xsk = this._deviceList.getStoredCrossSigningForUser(userId);
|
const xsk = this._deviceList.getStoredCrossSigningForUser(userId);
|
||||||
if (xsk.getId() === deviceId) {
|
if (xsk && xsk.getId() === deviceId) {
|
||||||
if (verified) {
|
if (verified) {
|
||||||
const device = await this._crossSigningInfo.signUser(xsk);
|
const device = await this._crossSigningInfo.signUser(xsk);
|
||||||
// FIXME: mark xsk as dirty in device list
|
// FIXME: mark xsk as dirty in device list
|
||||||
|
|||||||
Reference in New Issue
Block a user