diff --git a/src/api/gramjs/methods/client.ts b/src/api/gramjs/methods/client.ts index 164d7e700..9a6c7cca7 100644 --- a/src/api/gramjs/methods/client.ts +++ b/src/api/gramjs/methods/client.ts @@ -14,7 +14,7 @@ import type { } from '../../types'; import { - DEBUG, DEBUG_GRAMJS, UPLOAD_WORKERS, IS_TEST, + DEBUG, DEBUG_GRAMJS, UPLOAD_WORKERS, IS_TEST, APP_CODE_NAME, } from '../../../config'; import { onRequestPhoneNumber, onRequestCode, onRequestPassword, onRequestRegistration, @@ -42,7 +42,6 @@ import { pause } from '../../../util/schedulers'; const DEFAULT_USER_AGENT = 'Unknown UserAgent'; const DEFAULT_PLATFORM = 'Unknown platform'; -const APP_CODE_NAME = 'Z'; GramJsLogger.setLevel(DEBUG_GRAMJS ? 'debug' : 'warn'); diff --git a/src/config.ts b/src/config.ts index fc2d4974d..3917115ba 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,6 +1,7 @@ import type { ApiLimitType } from './global/types'; -export const APP_NAME = process.env.APP_NAME || 'Telegram Web A'; +export const APP_CODE_NAME = 'A'; +export const APP_NAME = process.env.APP_NAME || `Telegram Web ${APP_CODE_NAME}`; export const RELEASE_DATETIME = process.env.RELEASE_DATETIME; export const PRODUCTION_HOSTNAME = 'web.telegram.org'; diff --git a/src/util/permanentWebVersion.ts b/src/util/permanentWebVersion.ts index 25af49bd1..321b251a0 100644 --- a/src/util/permanentWebVersion.ts +++ b/src/util/permanentWebVersion.ts @@ -1,3 +1,4 @@ +// Handled by the legacy version. Cannot be updated const PERMANENT_VERSION_KEY = 'kz_version'; const AVAILABLE_VERSIONS = ['Z', 'K'] as const; diff --git a/src/util/websync.ts b/src/util/websync.ts index 7177027ab..b1c613504 100644 --- a/src/util/websync.ts +++ b/src/util/websync.ts @@ -1,5 +1,5 @@ import { - DEBUG, IS_MOCKED_CLIENT, IS_ELECTRON, + DEBUG, IS_MOCKED_CLIENT, IS_ELECTRON, APP_CODE_NAME, } from '../config'; import { getGlobal } from '../global'; import { hasStoredSession } from './sessions'; @@ -8,7 +8,7 @@ const WEBSYNC_URLS = [ 't.me', 'telegram.me', ].map((domain) => `https://${domain}/_websync_?`); -const WEBSYNC_VERSION = `${APP_VERSION} Z`; +const WEBSYNC_VERSION = `${APP_VERSION} ${APP_CODE_NAME}`; const WEBSYNC_KEY = 'tgme_sync'; const WEBSYNC_TIMEOUT = 86400;