diff --git a/js/signal_protocol_store.js b/js/signal_protocol_store.js index 2916f78f6..332174b7e 100644 --- a/js/signal_protocol_store.js +++ b/js/signal_protocol_store.js @@ -155,14 +155,7 @@ // We only care about the most recent update for each session const byId = _.groupBy(items, item => item.id); const ids = Object.keys(byId); - const mostRecent = ids.map(id => { - const item = _.last(byId[id]); - - return { - ...item, - record: item.record.serialize(), - }; - }); + const mostRecent = ids.map(id => _.last(byId[id])); await window.Signal.Data.createOrUpdateSessions(mostRecent); }, @@ -206,14 +199,7 @@ _hydrateCache( this, 'sessions', - (async () => { - const sessions = await window.Signal.Data.getAllSessions(); - - return sessions.map(item => ({ - ...item, - record: libsignal.SessionRecord.deserialize(item.record), - })); - })(), + await window.Signal.Data.getAllSessions(), 'id' ), _hydrateCache( @@ -343,7 +329,7 @@ const session = this.sessions[encodedNumber]; if (session) { - return session.record; + return libsignal.SessionRecord.deserialize(session.record); } return undefined; @@ -360,7 +346,7 @@ id: encodedNumber, number, deviceId, - record, + record: record.serialize(), }; this.sessions[encodedNumber] = data; diff --git a/js/views/settings_view.js b/js/views/settings_view.js index 0b02a7fc8..e1b879cc1 100644 --- a/js/views/settings_view.js +++ b/js/views/settings_view.js @@ -157,8 +157,6 @@ mediaPermissionsDescription: i18n('mediaPermissionsDescription'), generalHeader: i18n('general'), spellCheckDescription: i18n('spellCheckDescription'), - sendLinkPreviews: i18n('sendLinkPreviews'), - linkPreviewsDescription: i18n('linkPreviewsDescription'), }; }, onClose() { diff --git a/ts/util/lint/exceptions.json b/ts/util/lint/exceptions.json index aa9d68973..37eff25a8 100644 --- a/ts/util/lint/exceptions.json +++ b/ts/util/lint/exceptions.json @@ -946,7 +946,7 @@ "rule": "jQuery-$(", "path": "js/views/settings_view.js", "line": " this.$('.sync').text(i18n('syncNow'));", - "lineNumber": 183, + "lineNumber": 181, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -955,7 +955,7 @@ "rule": "jQuery-$(", "path": "js/views/settings_view.js", "line": " this.$('.sync').attr('disabled', 'disabled');", - "lineNumber": 187, + "lineNumber": 185, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -964,7 +964,7 @@ "rule": "jQuery-$(", "path": "js/views/settings_view.js", "line": " this.$('.synced_at').hide();", - "lineNumber": 199, + "lineNumber": 197, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -973,7 +973,7 @@ "rule": "jQuery-$(", "path": "js/views/settings_view.js", "line": " this.$('.sync_failed').hide();", - "lineNumber": 204, + "lineNumber": 202, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input"