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/package.json b/package.json index cc2474d16..26090fd53 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "session-desktop", "productName": "Session", "description": "Private messaging from your desktop", - "version": "1.5.5", + "version": "1.5.6", "license": "GPL-3.0", "author": { "name": "Loki Project", 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/components/session/ActionsPanel.tsx b/ts/components/session/ActionsPanel.tsx index 98d0cdde0..5ced06163 100644 --- a/ts/components/session/ActionsPanel.tsx +++ b/ts/components/session/ActionsPanel.tsx @@ -141,7 +141,7 @@ const setupTheme = (dispatch: Dispatch) => { }; // Do this only if we created a new Session ID, or if we already received the initial configuration message -const triggerSyncIfIfNeeded = async () => { +const triggerSyncIfNeeded = async () => { const didWeHandleAConfigurationMessageAlready = (await getItemById(hasSyncedInitialConfigurationItem))?.value || false; if (didWeHandleAConfigurationMessageAlready) { @@ -174,7 +174,7 @@ const doAppStartUp = (dispatch: Dispatch) => { void OpenGroupManagerV2.getInstance().startPolling(); // trigger a sync message if needed for our other devices - void triggerSyncIfIfNeeded(); + void triggerSyncIfNeeded(); void loadDefaultRooms(); diff --git a/ts/opengroup/opengroupV2/OpenGroupServerPoller.ts b/ts/opengroup/opengroupV2/OpenGroupServerPoller.ts index fb2a229c2..912671ea4 100644 --- a/ts/opengroup/opengroupV2/OpenGroupServerPoller.ts +++ b/ts/opengroup/opengroupV2/OpenGroupServerPoller.ts @@ -409,7 +409,7 @@ const handleCompactPollResults = async ( serverUrl: string, results: Array ) => { - console.warn('compoll res', results); + // console.warn('compoll res', results); await Promise.all( results.map(async res => { const convoId = getOpenGroupV2ConversationId(serverUrl, res.roomId); diff --git a/ts/receiver/closedGroups.ts b/ts/receiver/closedGroups.ts index 23dde05a4..2e146c304 100644 --- a/ts/receiver/closedGroups.ts +++ b/ts/receiver/closedGroups.ts @@ -643,7 +643,7 @@ function addMemberToZombies( if (isAlreadyZombie) { return false; } - console.warn('Marking user ', userToAdd.key, ' as a zombie'); + // console.warn('Marking user ', userToAdd.key, ' as a zombie'); convo.set('zombies', [...zombies, userToAdd.key]); return true; } diff --git a/ts/session/utils/Attachments.ts b/ts/session/utils/Attachments.ts index 28ce6a686..63a39301f 100644 --- a/ts/session/utils/Attachments.ts +++ b/ts/session/utils/Attachments.ts @@ -102,7 +102,7 @@ export class AttachmentUtils { pointer.id = uploadToV2Result.fileId; pointer.url = uploadToV2Result.fileUrl; } else { - console.warn('upload to file server v2 failed'); + window.log.warn('upload to file server v2 failed'); } } else { const result = isAvatar diff --git a/ts/session/utils/syncUtils.ts b/ts/session/utils/syncUtils.ts index 144b36cd1..9d69a4181 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; } @@ -195,7 +195,7 @@ export const getCurrentConfigurationMessage = async (convos: Array