From 19786108a3cdbbb3ed4aa97045d35d1d28a8f2ee Mon Sep 17 00:00:00 2001 From: Maxim Shishmarev Date: Fri, 29 Nov 2019 16:05:21 +1100 Subject: [PATCH] address reviews --- js/background.js | 2 +- js/models/conversations.js | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/js/background.js b/js/background.js index 515731138..479f4ecb1 100644 --- a/js/background.js +++ b/js/background.js @@ -1918,7 +1918,7 @@ window.Whisper.events.trigger('showSessionRestoreConfirmation', { pubkey, - onOk: async () => { + onOk: () => { convo.sendMessage('', null, null, null, null, { sessionRestoration: true, }); diff --git a/js/models/conversations.js b/js/models/conversations.js index 244d5f2f1..2d102d59c 100644 --- a/js/models/conversations.js +++ b/js/models/conversations.js @@ -1516,11 +1516,7 @@ messageWithSchema.sourceDevice = 1; } - let sessionRestoration = false; - - if (otherOptions) { - sessionRestoration = otherOptions.sessionRestoration || false; - } + const { sessionRestoration = false } = otherOptions; const attributes = { ...messageWithSchema,