From 7f571b695ed451c402bcb7aa282c1f2159729df0 Mon Sep 17 00:00:00 2001 From: Robin Date: Sat, 20 Jan 2024 15:55:45 -0500 Subject: [PATCH] Remove the gappy sync hack This hack was added in the early days of Element Call, back when we were doing call signaling using non-state room events, and missing part of a room's history could cause calls to fall apart. Nowadays we use state events for signaling, and all this hack is doing is making sync times unnecessarily long, so we can remove it. --- src/matrix-utils.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/matrix-utils.ts b/src/matrix-utils.ts index 08af1750..48c51d15 100644 --- a/src/matrix-utils.ts +++ b/src/matrix-utils.ts @@ -188,16 +188,8 @@ export async function initClient( await client.store.startup(); } - if (client.initCrypto) { - await client.initCrypto(); - } - - await client.startClient({ - // dirty hack to reduce chance of gappy syncs - // should be fixed by spotting gaps and backpaginating - initialSyncLimit: 50, - }); - + await client.initCrypto(); + await client.startClient(); await waitForSync(client); return client;