diff --git a/app/auto_update.js b/app/auto_update.js index 26bc105ee..6725cf3cd 100644 --- a/app/auto_update.js +++ b/app/auto_update.js @@ -18,8 +18,12 @@ function autoUpdateDisabled() { ); } -function checkForUpdates() { - autoUpdater.checkForUpdates(); +async function checkForUpdates() { + try { + await autoUpdater.checkForUpdates(); + } catch (error) { + console.log('checkForUpdates error:', error.stack); + } } let showingDialog = false; @@ -58,7 +62,7 @@ function showUpdateDialog(mainWindow, messages) { } function onError(error) { - console.log('Got an error while updating: ', error.stack); + console.log('Got an error while updating:', error.stack); } function initialize(getMainWindow, messages) { diff --git a/js/views/conversation_view.js b/js/views/conversation_view.js index e841cb914..3d2aafb56 100644 --- a/js/views/conversation_view.js +++ b/js/views/conversation_view.js @@ -708,9 +708,9 @@ // Look for message in memory first, which would tell us if we could scroll to it const targetMessage = this.model.messageCollection.find(item => { - const messageAuthor = item.getContact().id; + const messageAuthor = item.getContact(); - if (author !== messageAuthor) { + if (!messageAuthor || author !== messageAuthor.id) { return false; } if (id !== item.get('sent_at')) { diff --git a/libtextsecure/libsignal-protocol.js b/libtextsecure/libsignal-protocol.js index b349b11c5..b5eb93b3e 100644 --- a/libtextsecure/libsignal-protocol.js +++ b/libtextsecure/libsignal-protocol.js @@ -25294,13 +25294,20 @@ var origCurve25519 = Internal.curve25519_async; Internal.startWorker = function(url) { Internal.stopWorker(); // there can be only one + Internal.curve25519_async = new Curve25519Worker(url); + Internal.Curve.async = Internal.wrapCurve25519(Internal.curve25519_async); + libsignal.Curve.async = Internal.wrapCurve(Internal.Curve.async); }; Internal.stopWorker = function() { if (Internal.curve25519_async instanceof Curve25519Worker) { var worker = Internal.curve25519_async.worker; + Internal.curve25519_async = origCurve25519; + Internal.Curve.async = Internal.wrapCurve25519(Internal.curve25519_async); + libsignal.Curve.async = Internal.wrapCurve(Internal.Curve.async); + worker.terminate(); } }; @@ -35158,6 +35165,7 @@ Curve25519Worker.prototype = { }; } + Internal.wrapCurve25519 = wrapCurve25519; Internal.Curve = wrapCurve25519(Internal.curve25519); Internal.Curve.async = wrapCurve25519(Internal.curve25519_async); @@ -35185,6 +35193,7 @@ Curve25519Worker.prototype = { }; } + Internal.wrapCurve = wrapCurve; libsignal.Curve = wrapCurve(Internal.Curve); libsignal.Curve.async = wrapCurve(Internal.Curve.async); diff --git a/libtextsecure/sendmessage.js b/libtextsecure/sendmessage.js index e42fe21e1..ab070ff55 100644 --- a/libtextsecure/sendmessage.js +++ b/libtextsecure/sendmessage.js @@ -108,7 +108,7 @@ Message.prototype = { const item = new textsecure.protobuf.DataMessage.Preview(); item.title = preview.title; item.url = preview.url; - item.image = preview.image; + item.image = preview.image || null; return item; }); } diff --git a/main.js b/main.js index 775e160be..a591de670 100644 --- a/main.js +++ b/main.js @@ -369,7 +369,9 @@ function createWindow() { } await requestShutdown(); - mainWindow.readyForShutdown = true; + if (mainWindow) { + mainWindow.readyForShutdown = true; + } app.quit(); }); diff --git a/package.json b/package.json index a03e5b848..405ce470c 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.21.0", + "version": "1.21.1-beta.1", "license": "GPL-3.0", "author": { "name": "Open Whisper Systems",