Do not do websync in non-production mode

This commit is contained in:
Alexander Zinchuk 2021-08-19 03:16:36 +03:00
parent d54369c33a
commit 49e593d291

View File

@ -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();