Make linter happy

pull/381/head
sachaaaaa 6 years ago
parent bf8bb23683
commit edd800d382

@ -775,9 +775,7 @@ async function updateSchema(instance) {
await updateLokiSchema(instance); await updateLokiSchema(instance);
} }
const LOKI_SCHEMA_VERSIONS = [ const LOKI_SCHEMA_VERSIONS = [updateToLokiSchemaVersion2];
updateToLokiSchemaVersion2,
];
async function updateToLokiSchemaVersion2(currentVersion, instance) { async function updateToLokiSchemaVersion2(currentVersion, instance) {
if (currentVersion >= 2) { if (currentVersion >= 2) {
@ -808,7 +806,9 @@ async function updateToLokiSchemaVersion2(currentVersion, instance) {
} }
async function updateLokiSchema(instance) { async function updateLokiSchema(instance) {
const result = await instance.get("SELECT name FROM sqlite_master WHERE type = 'table' AND name='loki_schema'"); const result = await instance.get(
"SELECT name FROM sqlite_master WHERE type = 'table' AND name='loki_schema'"
);
if (!result) { if (!result) {
await createLokiSchemaTable(instance); await createLokiSchemaTable(instance);
} }
@ -818,7 +818,11 @@ async function updateLokiSchema(instance) {
`Current loki schema version: ${lokiSchemaVersion};`, `Current loki schema version: ${lokiSchemaVersion};`,
`Most recent schema version: ${LOKI_SCHEMA_VERSIONS.length};` `Most recent schema version: ${LOKI_SCHEMA_VERSIONS.length};`
); );
for (let index = 0, max = LOKI_SCHEMA_VERSIONS.length; index < max; index += 1) { for (
let index = 0, max = LOKI_SCHEMA_VERSIONS.length;
index < max;
index += 1
) {
const runSchemaUpdate = LOKI_SCHEMA_VERSIONS[index]; const runSchemaUpdate = LOKI_SCHEMA_VERSIONS[index];
// Yes, we really want to do this asynchronously, in order // Yes, we really want to do this asynchronously, in order
@ -828,7 +832,9 @@ async function updateLokiSchema(instance) {
} }
async function getLokiSchemaVersion(instance) { async function getLokiSchemaVersion(instance) {
const result = await instance.get('SELECT version FROM loki_schema WHERE version = (SELECT MAX(version) FROM loki_schema);'); const result = await instance.get(
'SELECT version FROM loki_schema WHERE version = (SELECT MAX(version) FROM loki_schema);'
);
if (!result.version) { if (!result.version) {
return 0; return 0;
} }
@ -1237,7 +1243,10 @@ async function getPairingAuthorisation(issuerPubKey, secondaryDevicePubKey) {
async function createOrUpdatePairingAuthorisation(data) { async function createOrUpdatePairingAuthorisation(data) {
const { issuerPubKey, secondaryDevicePubKey, signature } = data; const { issuerPubKey, secondaryDevicePubKey, signature } = data;
const existing = await getPairingAuthorisation(issuerPubKey, secondaryDevicePubKey); const existing = await getPairingAuthorisation(
issuerPubKey,
secondaryDevicePubKey
);
// prevent adding duplicate entries // prevent adding duplicate entries
if (existing) { if (existing) {
return; return;

@ -3,7 +3,6 @@
textsecure, textsecure,
libsignal, libsignal,
libloki, libloki,
Whisper,
mnemonic, mnemonic,
btoa, btoa,
Signal, Signal,

Loading…
Cancel
Save