diff --git a/js/background.js b/js/background.js index 3631ae88f..5a8bb4606 100644 --- a/js/background.js +++ b/js/background.js @@ -756,8 +756,9 @@ messageReceiver.addEventListener('sent', window.DataMessageReceiver.handleMessageEvent); messageReceiver.addEventListener('reconnect', onReconnect); messageReceiver.addEventListener('configuration', onConfiguration); - // messageReceiver.addEventListener('typing', onTyping); + window.SwarmPolling.addPubkey(window.libsession.Utils.UserUtils.getOurPubKeyStrFromCache()); + window.SwarmPolling.start(); window.libsession.Utils.AttachmentDownloads.start({ logger: window.log, }); diff --git a/preload.js b/preload.js index ca15f6608..32cca1af0 100644 --- a/preload.js +++ b/preload.js @@ -328,6 +328,7 @@ window.LokiPublicChatAPI = require('./js/modules/loki_public_chat_api'); window.LokiFileServerAPI = require('./js/modules/loki_file_server_api'); window.LokiPushNotificationServerApi = require('./js/modules/loki_push_notification_server_api'); +window.SwarmPolling = require('./ts/session/snode_api/swarmPolling').SwarmPolling.getInstance(); const WorkerInterface = require('./js/modules/util_worker_interface'); diff --git a/ts/session/utils/syncUtils.ts b/ts/session/utils/syncUtils.ts index 144b36cd1..4bfbf7ec7 100644 --- a/ts/session/utils/syncUtils.ts +++ b/ts/session/utils/syncUtils.ts @@ -42,7 +42,7 @@ export const syncConfigurationIfNeeded = async () => { const now = Date.now(); // if the last sync was less than 2 days before, return early. - if (Math.abs(now - lastSyncedTimestamp) < DAYS * 2) { + if (Math.abs(now - lastSyncedTimestamp) < DAYS * 7) { return; }