From 4e6faf4e27c915db54404676dbaf4d836bd5b1aa Mon Sep 17 00:00:00 2001 From: lilia Date: Mon, 29 Dec 2014 16:19:30 +0100 Subject: [PATCH] Always listen for (re-)registration events If we clear local storage and re-register in a foreground page, the background page needs to re-init its websocket with the new account credentials. --- js/background.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/background.js b/js/background.js index 51d9b8687..63caefcf0 100644 --- a/js/background.js +++ b/js/background.js @@ -26,9 +26,8 @@ if (textsecure.registration.isDone()) { init(); - } else { - extension.on('registration_done', init); } + extension.on('registration_done', init); function init() { if (!textsecure.registration.isDone()) { return; }