From 49e593d29164028d0f93fe38944780bb3fe59063 Mon Sep 17 00:00:00 2001 From: Alexander Zinchuk Date: Thu, 19 Aug 2021 03:16:36 +0300 Subject: [PATCH] Do not do websync in non-production mode --- src/util/websync.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/util/websync.ts b/src/util/websync.ts index 3037d99b2..fb2eadebc 100644 --- a/src/util/websync.ts +++ b/src/util/websync.ts @@ -1,4 +1,4 @@ -import { APP_VERSION } from '../config'; +import { APP_VERSION, DEBUG } from '../config'; import { getGlobal } from '../lib/teact/teactn'; import { hasStoredSession } from './sessions'; @@ -66,6 +66,10 @@ export const forceWebsync = (authed: boolean) => { }; export function startWebsync() { + if (DEBUG) { + return; + } + if (lastTimeout !== undefined) return; const currentTs = getTs();