From 3b50de02c32fed04234abe09f748ec5089563a6b Mon Sep 17 00:00:00 2001 From: Alexander Zinchuk Date: Fri, 19 Nov 2021 03:22:35 +0300 Subject: [PATCH] Send platform string to `InitConnection` --- src/api/gramjs/methods/client.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/api/gramjs/methods/client.ts b/src/api/gramjs/methods/client.ts index 271951be..b7470f42 100644 --- a/src/api/gramjs/methods/client.ts +++ b/src/api/gramjs/methods/client.ts @@ -27,6 +27,7 @@ import localDb from '../localDb'; import { buildApiPeerId } from '../apiBuilders/peers'; const DEFAULT_USER_AGENT = 'Unknown UserAgent'; +const DEFAULT_PLATFORM = 'Unknown platform'; const APP_CODE_NAME = 'Z'; GramJsLogger.setLevel(DEBUG_GRAMJS ? 'debug' : 'warn'); @@ -59,6 +60,7 @@ export async function init(_onUpdate: OnApiUpdate, initialArgs: ApiInitialArgs) process.env.TELEGRAM_T_API_HASH, { deviceModel: navigator.userAgent || userAgent || DEFAULT_USER_AGENT, + systemVersion: platform || DEFAULT_PLATFORM, appVersion: `${APP_VERSION} ${APP_CODE_NAME}`, useWSS: true, additionalDcsDisabled: IS_TEST,