Adds additional logging to boot path

This commit is contained in:
Josh Perez 2020-02-18 10:48:58 -08:00 committed by GitHub
parent be819f9fdd
commit 0843f569a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 1 deletions

View File

@ -1492,7 +1492,7 @@
let connectCount = 0; let connectCount = 0;
async function connect(firstRun) { async function connect(firstRun) {
window.log.info('connect'); window.log.info('connect', firstRun);
// Bootstrap our online/offline detection, only the first time we connect // Bootstrap our online/offline detection, only the first time we connect
if (connectCount === 0 && navigator.onLine) { if (connectCount === 0 && navigator.onLine) {
@ -1537,6 +1537,7 @@
Whisper.Notifications.disable(); // avoid notification flood until empty Whisper.Notifications.disable(); // avoid notification flood until empty
// initialize the socket and start listening for messages // initialize the socket and start listening for messages
window.log.info('Initializing socket and listening for messages');
messageReceiver = new textsecure.MessageReceiver( messageReceiver = new textsecure.MessageReceiver(
USERNAME, USERNAME,
PASSWORD, PASSWORD,
@ -1600,6 +1601,7 @@
// eslint-disable-next-line eqeqeq // eslint-disable-next-line eqeqeq
textsecure.storage.user.getDeviceId() != '1' textsecure.storage.user.getDeviceId() != '1'
) { ) {
window.log.info('Boot after upgrading. Requesting contact sync');
window.getSyncRequest(); window.getSyncRequest();
try { try {

View File

@ -14,6 +14,7 @@ let scheduleNext = null;
// We need to refresh our own profile regularly to account for newly-added devices which // We need to refresh our own profile regularly to account for newly-added devices which
// do not support unidentified delivery. // do not support unidentified delivery.
function refreshOurProfile() { function refreshOurProfile() {
window.log.info('refreshOurProfile');
const ourNumber = textsecure.storage.user.getNumber(); const ourNumber = textsecure.storage.user.getNumber();
const conversation = ConversationController.getOrCreate(ourNumber, 'private'); const conversation = ConversationController.getOrCreate(ourNumber, 'private');
conversation.getProfiles(); conversation.getProfiles();

View File

@ -585,6 +585,8 @@
// Ensure that we always have a conversation for ourself // Ensure that we always have a conversation for ourself
await ConversationController.getOrCreateAndWait(number, 'private'); await ConversationController.getOrCreateAndWait(number, 'private');
window.log.info('dispatching registration event');
this.dispatchEvent(new Event('registration')); this.dispatchEvent(new Event('registration'));
}, },
}); });