diff --git a/js/background.js b/js/background.js index a6c8a01c9..6d119c0c1 100644 --- a/js/background.js +++ b/js/background.js @@ -1492,7 +1492,7 @@ let connectCount = 0; async function connect(firstRun) { - window.log.info('connect'); + window.log.info('connect', firstRun); // Bootstrap our online/offline detection, only the first time we connect if (connectCount === 0 && navigator.onLine) { @@ -1537,6 +1537,7 @@ Whisper.Notifications.disable(); // avoid notification flood until empty // initialize the socket and start listening for messages + window.log.info('Initializing socket and listening for messages'); messageReceiver = new textsecure.MessageReceiver( USERNAME, PASSWORD, @@ -1600,6 +1601,7 @@ // eslint-disable-next-line eqeqeq textsecure.storage.user.getDeviceId() != '1' ) { + window.log.info('Boot after upgrading. Requesting contact sync'); window.getSyncRequest(); try { diff --git a/js/modules/refresh_sender_certificate.js b/js/modules/refresh_sender_certificate.js index 70d4cd586..efc37ff63 100644 --- a/js/modules/refresh_sender_certificate.js +++ b/js/modules/refresh_sender_certificate.js @@ -14,6 +14,7 @@ let scheduleNext = null; // We need to refresh our own profile regularly to account for newly-added devices which // do not support unidentified delivery. function refreshOurProfile() { + window.log.info('refreshOurProfile'); const ourNumber = textsecure.storage.user.getNumber(); const conversation = ConversationController.getOrCreate(ourNumber, 'private'); conversation.getProfiles(); diff --git a/libtextsecure/account_manager.js b/libtextsecure/account_manager.js index e94f6803a..ecb0e7d35 100644 --- a/libtextsecure/account_manager.js +++ b/libtextsecure/account_manager.js @@ -585,6 +585,8 @@ // Ensure that we always have a conversation for ourself await ConversationController.getOrCreateAndWait(number, 'private'); + window.log.info('dispatching registration event'); + this.dispatchEvent(new Event('registration')); }, });