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.
This commit is contained in:
parent
9a30a1e175
commit
4e6faf4e27
1 changed files with 1 additions and 2 deletions
|
@ -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; }
|
||||
|
|
Loading…
Reference in a new issue