API: Update client code name (#3752)
This commit is contained in:
parent
081eca103e
commit
1de3f4811e
@ -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');
|
||||
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user