1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-12-05 17:02:07 +03:00

fix linting errors

This commit is contained in:
Cédric Van Rompay
2020-01-24 09:20:43 +01:00
parent 9346c83dc1
commit e1f832bfa7
4 changed files with 52 additions and 24 deletions

View File

@@ -97,7 +97,7 @@ function keyFromRecoverySession(session, decryptionKey) {
* @param {string} opts.accessToken The access_token for this user.
*
* @param {string} opts.userId The user ID for this user.
*
*
* @param {Object} opts.deviceToImport Device data exported with
* (TODO link to export method) that must be imported to recreate this device.
* Should only be useful for deviced with end-to-end crypto enabled.
@@ -256,10 +256,18 @@ export function MatrixClient(opts) {
if (opts.deviceToImport) {
if (this.deviceId) {
logger.warn('not importing device because device ID is provided to constructor independently of exported data');
logger.warn(
'not importing device because'
+ ' device ID is provided to constructor'
+ ' independently of exported data',
);
} else if (this.credentials.userId) {
logger.warn('not importing device because user ID is provided to constructor independently of exported data');
} else if (!(opts.deviceToImport.deviceId)){
logger.warn(
'not importing device because'
+ ' user ID is provided to constructor'
+ ' independently of exported data',
);
} else if (!(opts.deviceToImport.deviceId)) {
logger.warn('not importing device because no device ID in exported data');
} else {
this.deviceId = opts.deviceToImport.deviceId;