1
0
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:
Hubert Chathi
2019-06-05 15:24:03 -04:00
parent 5f539aacd9
commit 0c714ba4a1
4 changed files with 1 additions and 7 deletions

View File

@@ -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';

View File

@@ -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) {

View File

@@ -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,

View File

@@ -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