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

All the linting

This commit is contained in:
David Baker
2019-02-05 13:03:27 +00:00
parent b3513dc8f8
commit 7f5584e4f5
4 changed files with 60 additions and 28 deletions

View File

@@ -917,13 +917,17 @@ async function _updateStoredSelfSigningKeyForUser(
return;
}
if (!userResult || !userResult.usage.includes('self_signing')) {
logger.warn("Self-signing key for " + userId + " does not include 'self_signing' usage: ignoring");
logger.warn(
"Self-signing key for " + userId +
" does not include 'self_signing' usage: ignoring",
);
return;
}
const keyCount = Object.keys(userResult.keys).length;
if (keyCount !== 1) {
logger.warn(
"Self-signing key block for " + userId + " has " + keyCount + " keys: expected exactly 1. Ignoring.",
"Self-signing key block for " + userId + " has " +
keyCount + " keys: expected exactly 1. Ignoring.",
);
return;
}
@@ -937,7 +941,10 @@ async function _updateStoredSelfSigningKeyForUser(
const newKey = userResult.keys[newKeyId];
if (oldKeyId !== newKeyId || oldKey !== newKey) {
updated = true;
logger.info("New self-signing key detected for " + userId + ": " + newKeyId + ", was previously " + oldKeyId);
logger.info(
"New self-signing key detected for " + userId +
": " + newKeyId + ", was previously " + oldKeyId,
);
userStore.user_id = userResult.user_id;
userStore.usage = userResult.usage;