From 0c69d725c354543f07c1b48dd2ba82f20368db3d Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Mon, 25 Mar 2019 10:22:33 -0700 Subject: [PATCH 1/7] Ensure that we have all conversations in redux store --- js/conversation_controller.js | 1 + js/views/inbox_view.js | 13 +++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/js/conversation_controller.js b/js/conversation_controller.js index 6f0c8f1a1..a13eae124 100644 --- a/js/conversation_controller.js +++ b/js/conversation_controller.js @@ -55,6 +55,7 @@ }))(); window.getInboxCollection = () => inboxCollection; + window.getConversations = () => conversations; window.ConversationController = { get(id) { diff --git a/js/views/inbox_view.js b/js/views/inbox_view.js index 0370e156b..eaea8cbb5 100644 --- a/js/views/inbox_view.js +++ b/js/views/inbox_view.js @@ -1,6 +1,7 @@ /* global ConversationController, extension, + getConversations, getInboxCollection, i18n, Whisper, @@ -104,8 +105,8 @@ }, setupLeftPane() { // Here we set up a full redux store with initial state for our LeftPane Root - const inboxCollection = getInboxCollection(); - const conversations = inboxCollection.map( + const convoCollection = getConversations(); + const conversations = convoCollection.map( conversation => conversation.cachedProps ); const initialState = { @@ -145,19 +146,19 @@ this.openConversationAction = openConversationExternal; - this.listenTo(inboxCollection, 'remove', conversation => { + this.listenTo(convoCollection, 'remove', conversation => { const { id } = conversation || {}; conversationRemoved(id); }); - this.listenTo(inboxCollection, 'add', conversation => { + this.listenTo(convoCollection, 'add', conversation => { const { id, cachedProps } = conversation || {}; conversationAdded(id, cachedProps); }); - this.listenTo(inboxCollection, 'change', conversation => { + this.listenTo(convoCollection, 'change', conversation => { const { id, cachedProps } = conversation || {}; conversationChanged(id, cachedProps); }); - this.listenTo(inboxCollection, 'reset', removeAllConversations); + this.listenTo(convoCollection, 'reset', removeAllConversations); Whisper.events.on('messageExpired', messageExpired); Whisper.events.on('userChanged', userChanged); From 5c2514ecb8d1893a00f779582df91bbe4e21d2ec Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Fri, 22 Mar 2019 14:26:07 -0700 Subject: [PATCH 2/7] Remove unused aptly target --- aptly.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/aptly.sh b/aptly.sh index ed03ea5d5..a761b806f 100755 --- a/aptly.sh +++ b/aptly.sh @@ -26,8 +26,8 @@ echo "Releasing $NAME build version $VERSION" REPO=signal-desktop -CURRENT=artful -PREVIOUS=xenial +CURRENT=xenial +# PREVIOUS=xenial ENDPOINT=signal-desktop-apt # Matches endpoint name in .aptly.conf SNAPSHOT=signal-desktop_v$VERSION GPG_KEYID=57F6FB06 @@ -46,7 +46,7 @@ aptly snapshot create $SNAPSHOT from repo $REPO # these update already-published repos, run every time after that # https://www.aptly.info/doc/aptly/publish/switch/ aptly publish switch -gpg-key=$GPG_KEYID $CURRENT $SNAPSHOT -aptly publish switch -gpg-key=$GPG_KEYID $PREVIOUS $SNAPSHOT +# aptly publish switch -gpg-key=$GPG_KEYID $PREVIOUS $SNAPSHOT aptly publish switch -gpg-key=$GPG_KEYID -config=.aptly.conf $CURRENT s3:$ENDPOINT: $SNAPSHOT -aptly publish switch -gpg-key=$GPG_KEYID -config=.aptly.conf $PREVIOUS s3:$ENDPOINT: $SNAPSHOT +# aptly publish switch -gpg-key=$GPG_KEYID -config=.aptly.conf $PREVIOUS s3:$ENDPOINT: $SNAPSHOT From 6ef0eb7284bcb5cc3c6832a55f13aa8712be0ec6 Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Thu, 28 Mar 2019 10:51:19 -0700 Subject: [PATCH 3/7] When closing database, be resilient to null db --- app/sql.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/sql.js b/app/sql.js index ff004629d..29a34535e 100644 --- a/app/sql.js +++ b/app/sql.js @@ -749,6 +749,10 @@ async function initialize({ configDir, key, messages }) { } async function close() { + if (!db) { + return; + } + const dbRef = db; db = null; await dbRef.close(); From e15daf7a37511c1b35d70915065fa66b69b2ae97 Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Thu, 28 Mar 2019 13:34:53 -0700 Subject: [PATCH 4/7] Update to Electron v4.1.2 to fix permissions issue https://github.com/electron/electron/releases/tag/v4.1.2 Permissions issue: https://github.com/electron/electron/issues/17581 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 36a6ae481..298fea1df 100644 --- a/package.json +++ b/package.json @@ -121,7 +121,7 @@ "asar": "0.14.0", "bower": "1.8.2", "chai": "4.1.2", - "electron": "4.1.1", + "electron": "4.1.2", "electron-builder": "20.33.1", "electron-icon-maker": "0.0.3", "eslint": "4.14.0", diff --git a/yarn.lock b/yarn.lock index 8a7df1e1a..e3e9bf8cc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2692,10 +2692,10 @@ electron-updater@3.2.0: semver "^5.6.0" source-map-support "^0.5.9" -electron@4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/electron/-/electron-4.1.1.tgz#dc9343ba829cabbf01364761e72796f766704184" - integrity sha512-ABIEXTw55eiCW30a6F8fWLHL0QeH+yK3JgZpvTZZWLnkO5/SmG38avMxRhKOUQstRpYb+EEpE8IAM2DVOaTvtw== +electron@4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/electron/-/electron-4.1.2.tgz#dc8be0f219c73d60a97675d6d3c5b040c4f50513" + integrity sha512-QWz298CaH2jLyFVje01sj4fSEdXJj+oKVw2jNUovrhZE5jmFE4cr/KqZ7iHX00DG6AwmDF4W1Xrv0V+aQOkieQ== dependencies: "@types/node" "^10.12.18" electron-download "^4.1.0" From 613d0ddd12ab3a00c06a4c2122e1c728422d6770 Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Thu, 28 Mar 2019 16:52:29 -0700 Subject: [PATCH 5/7] Lint fixes --- ts/util/lint/exceptions.json | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/ts/util/lint/exceptions.json b/ts/util/lint/exceptions.json index 6b00fb2a4..2e61480a3 100644 --- a/ts/util/lint/exceptions.json +++ b/ts/util/lint/exceptions.json @@ -164,7 +164,7 @@ "rule": "jQuery-load(", "path": "js/conversation_controller.js", "line": " async load() {", - "lineNumber": 177, + "lineNumber": 178, "reasonCategory": "falseMatch", "updated": "2018-10-02T21:00:44.007Z" }, @@ -172,7 +172,7 @@ "rule": "jQuery-load(", "path": "js/conversation_controller.js", "line": " this._initialPromise = load();", - "lineNumber": 212, + "lineNumber": 213, "reasonCategory": "falseMatch", "updated": "2018-10-02T21:00:44.007Z" }, @@ -501,7 +501,7 @@ "rule": "jQuery-$(", "path": "js/views/inbox_view.js", "line": " let $el = this.$(`#${id}`);", - "lineNumber": 28, + "lineNumber": 29, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -510,7 +510,7 @@ "rule": "jQuery-prependTo(", "path": "js/views/inbox_view.js", "line": " $el.prependTo(this.el);", - "lineNumber": 37, + "lineNumber": 38, "reasonCategory": "usageTrusted", "updated": "2018-09-19T18:13:29.628Z", "reasonDetail": "Interacting with already-existing DOM nodes" @@ -519,7 +519,7 @@ "rule": "jQuery-$(", "path": "js/views/inbox_view.js", "line": " this.$('.message').text(message);", - "lineNumber": 49, + "lineNumber": 50, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -528,7 +528,7 @@ "rule": "jQuery-$(", "path": "js/views/inbox_view.js", "line": " el: this.$('.conversation-stack'),", - "lineNumber": 66, + "lineNumber": 67, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -537,7 +537,7 @@ "rule": "jQuery-prependTo(", "path": "js/views/inbox_view.js", "line": " this.appLoadingScreen.$el.prependTo(this.el);", - "lineNumber": 73, + "lineNumber": 74, "reasonCategory": "usageTrusted", "updated": "2018-09-19T18:13:29.628Z", "reasonDetail": "Interacting with already-existing DOM nodes" @@ -546,7 +546,7 @@ "rule": "jQuery-append(", "path": "js/views/inbox_view.js", "line": " .append(this.networkStatusView.render().el);", - "lineNumber": 88, + "lineNumber": 89, "reasonCategory": "usageTrusted", "updated": "2018-09-19T18:13:29.628Z", "reasonDetail": "Interacting with already-existing DOM nodes" @@ -555,7 +555,7 @@ "rule": "jQuery-prependTo(", "path": "js/views/inbox_view.js", "line": " banner.$el.prependTo(this.$el);", - "lineNumber": 92, + "lineNumber": 93, "reasonCategory": "usageTrusted", "updated": "2018-09-19T18:13:29.628Z", "reasonDetail": "Interacting with already-existing DOM nodes" @@ -564,7 +564,7 @@ "rule": "jQuery-$(", "path": "js/views/inbox_view.js", "line": " this.$('.left-pane-placeholder').append(this.leftPaneView.el);", - "lineNumber": 166, + "lineNumber": 167, "reasonCategory": "usageTrusted", "updated": "2019-03-08T23:49:08.796Z", "reasonDetail": "Protected from arbitrary input" @@ -573,7 +573,7 @@ "rule": "jQuery-append(", "path": "js/views/inbox_view.js", "line": " this.$('.left-pane-placeholder').append(this.leftPaneView.el);", - "lineNumber": 166, + "lineNumber": 167, "reasonCategory": "usageTrusted", "updated": "2019-03-08T23:49:08.796Z", "reasonDetail": "Protected from arbitrary input" @@ -582,7 +582,7 @@ "rule": "jQuery-$(", "path": "js/views/inbox_view.js", "line": " if (e && this.$(e.target).closest('.placeholder').length) {", - "lineNumber": 207, + "lineNumber": 208, "reasonCategory": "usageTrusted", "updated": "2019-03-08T23:49:08.796Z", "reasonDetail": "Protected from arbitrary input" @@ -591,7 +591,7 @@ "rule": "jQuery-$(", "path": "js/views/inbox_view.js", "line": " this.$('#header, .gutter').addClass('inactive');", - "lineNumber": 211, + "lineNumber": 212, "reasonCategory": "usageTrusted", "updated": "2019-03-08T23:49:08.796Z", "reasonDetail": "Protected from arbitrary input" @@ -600,7 +600,7 @@ "rule": "jQuery-$(", "path": "js/views/inbox_view.js", "line": " this.$('.conversation-stack').addClass('inactive');", - "lineNumber": 215, + "lineNumber": 216, "reasonCategory": "usageTrusted", "updated": "2019-03-08T23:49:08.796Z", "reasonDetail": "Protected from arbitrary input" @@ -609,7 +609,7 @@ "rule": "jQuery-$(", "path": "js/views/inbox_view.js", "line": " this.$('.conversation:first .menu').trigger('close');", - "lineNumber": 217, + "lineNumber": 218, "reasonCategory": "usageTrusted", "updated": "2019-03-08T23:49:08.796Z", "reasonDetail": "Protected from arbitrary input" @@ -618,7 +618,7 @@ "rule": "jQuery-$(", "path": "js/views/inbox_view.js", "line": " if (e && this.$(e.target).closest('.capture-audio').length > 0) {", - "lineNumber": 236, + "lineNumber": 237, "reasonCategory": "usageTrusted", "updated": "2019-03-08T23:49:08.796Z", "reasonDetail": "Protected from arbitrary input" @@ -627,7 +627,7 @@ "rule": "jQuery-$(", "path": "js/views/inbox_view.js", "line": " this.$('.conversation:first .recorder').trigger('close');", - "lineNumber": 239, + "lineNumber": 240, "reasonCategory": "usageTrusted", "updated": "2019-03-08T23:49:08.796Z", "reasonDetail": "Protected from arbitrary input" @@ -2961,7 +2961,7 @@ "rule": "jQuery-append(", "path": "node_modules/electron/electron.d.ts", "line": " append(menuItem: MenuItem): void;", - "lineNumber": 3431, + "lineNumber": 3433, "reasonCategory": "falseMatch", "updated": "2019-02-22T01:08:09.603Z" }, From 377ab6c1cbb4f99e8f0c1c643492573651fd743f Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Thu, 28 Mar 2019 18:42:23 -0700 Subject: [PATCH 6/7] v1.23.2-beta.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 298fea1df..b1f930416 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "productName": "Signal", "description": "Private messaging from your desktop", "repository": "https://github.com/signalapp/Signal-Desktop.git", - "version": "1.23.1-beta.1", + "version": "1.23.2-beta.1", "license": "GPL-3.0", "author": { "name": "Open Whisper Systems", From beebd1885b2d30c9b0c0a138114aeacd9ce0b514 Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Fri, 29 Mar 2019 09:44:56 -0700 Subject: [PATCH 7/7] v1.23.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b1f930416..4c6e4e937 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "productName": "Signal", "description": "Private messaging from your desktop", "repository": "https://github.com/signalapp/Signal-Desktop.git", - "version": "1.23.2-beta.1", + "version": "1.23.2", "license": "GPL-3.0", "author": { "name": "Open Whisper Systems",