diff --git a/src/api/gramjs/methods/client.ts b/src/api/gramjs/methods/client.ts index 311779e1e..f1ab980bd 100644 --- a/src/api/gramjs/methods/client.ts +++ b/src/api/gramjs/methods/client.ts @@ -70,7 +70,7 @@ export async function init(_onUpdate: OnApiUpdate, initialArgs: ApiInitialArgs) const { userAgent, platform, sessionData, isTest, isWebmSupported, maxBufferSize, webAuthToken, dcId, mockScenario, shouldForceHttpTransport, shouldAllowHttpTransport, - shouldDebugExportedSenders, + shouldDebugExportedSenders, langCode, } = initialArgs; const session = new sessions.CallbackSession(sessionData, onSessionUpdate); @@ -94,6 +94,7 @@ export async function init(_onUpdate: OnApiUpdate, initialArgs: ApiInitialArgs) shouldAllowHttpTransport, testServers: isTest, dcId, + langCode, } as any, ); diff --git a/src/api/types/misc.ts b/src/api/types/misc.ts index e9fcb78fb..31cbd5863 100644 --- a/src/api/types/misc.ts +++ b/src/api/types/misc.ts @@ -15,6 +15,7 @@ export interface ApiInitialArgs { shouldAllowHttpTransport?: boolean; shouldForceHttpTransport?: boolean; shouldDebugExportedSenders?: boolean; + langCode: string; } export interface ApiOnProgress { diff --git a/src/components/modals/webApp/WebAppModal.tsx b/src/components/modals/webApp/WebAppModal.tsx index 2902dce81..37053973e 100644 --- a/src/components/modals/webApp/WebAppModal.tsx +++ b/src/components/modals/webApp/WebAppModal.tsx @@ -532,7 +532,7 @@ const WebAppModal: FC = ({ >
-
{bot?.firstName}
+
{attachBot?.shortName ?? bot?.firstName}
=> { shouldAllowHttpTransport: global.settings.byKey.shouldAllowHttpTransport, shouldForceHttpTransport: global.settings.byKey.shouldForceHttpTransport, shouldDebugExportedSenders: global.settings.byKey.shouldDebugExportedSenders, + langCode: global.settings.byKey.language, }); void setShouldEnableDebugLog(Boolean(global.settings.byKey.shouldCollectDebugLogs)); diff --git a/src/lib/gramjs/client/TelegramClient.js b/src/lib/gramjs/client/TelegramClient.js index 25c92f7b1..c639d896a 100644 --- a/src/lib/gramjs/client/TelegramClient.js +++ b/src/lib/gramjs/client/TelegramClient.js @@ -157,7 +157,7 @@ class TelegramClient { .toString() || '1.0', appVersion: args.appVersion || '1.0', langCode: args.langCode, - langPack: '', // this should be left empty. + langPack: 'weba', systemLangCode: args.systemLangCode, query: x, proxy: undefined, // no proxies yet.