Bots: Use localized name for attached bots (#4330)
This commit is contained in:
parent
3c7b07d07f
commit
45d019b5f8
@ -70,7 +70,7 @@ export async function init(_onUpdate: OnApiUpdate, initialArgs: ApiInitialArgs)
|
|||||||
const {
|
const {
|
||||||
userAgent, platform, sessionData, isTest, isWebmSupported, maxBufferSize, webAuthToken, dcId,
|
userAgent, platform, sessionData, isTest, isWebmSupported, maxBufferSize, webAuthToken, dcId,
|
||||||
mockScenario, shouldForceHttpTransport, shouldAllowHttpTransport,
|
mockScenario, shouldForceHttpTransport, shouldAllowHttpTransport,
|
||||||
shouldDebugExportedSenders,
|
shouldDebugExportedSenders, langCode,
|
||||||
} = initialArgs;
|
} = initialArgs;
|
||||||
const session = new sessions.CallbackSession(sessionData, onSessionUpdate);
|
const session = new sessions.CallbackSession(sessionData, onSessionUpdate);
|
||||||
|
|
||||||
@ -94,6 +94,7 @@ export async function init(_onUpdate: OnApiUpdate, initialArgs: ApiInitialArgs)
|
|||||||
shouldAllowHttpTransport,
|
shouldAllowHttpTransport,
|
||||||
testServers: isTest,
|
testServers: isTest,
|
||||||
dcId,
|
dcId,
|
||||||
|
langCode,
|
||||||
} as any,
|
} as any,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -15,6 +15,7 @@ export interface ApiInitialArgs {
|
|||||||
shouldAllowHttpTransport?: boolean;
|
shouldAllowHttpTransport?: boolean;
|
||||||
shouldForceHttpTransport?: boolean;
|
shouldForceHttpTransport?: boolean;
|
||||||
shouldDebugExportedSenders?: boolean;
|
shouldDebugExportedSenders?: boolean;
|
||||||
|
langCode: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ApiOnProgress {
|
export interface ApiOnProgress {
|
||||||
|
|||||||
@ -532,7 +532,7 @@ const WebAppModal: FC<OwnProps & StateProps> = ({
|
|||||||
>
|
>
|
||||||
<div className={backButtonClassName} />
|
<div className={backButtonClassName} />
|
||||||
</Button>
|
</Button>
|
||||||
<div className="modal-title">{bot?.firstName}</div>
|
<div className="modal-title">{attachBot?.shortName ?? bot?.firstName}</div>
|
||||||
<DropdownMenu
|
<DropdownMenu
|
||||||
className="web-app-more-menu with-menu-transitions"
|
className="web-app-more-menu with-menu-transitions"
|
||||||
trigger={MoreMenuButton}
|
trigger={MoreMenuButton}
|
||||||
|
|||||||
@ -60,6 +60,7 @@ addActionHandler('initApi', async (global, actions): Promise<void> => {
|
|||||||
shouldAllowHttpTransport: global.settings.byKey.shouldAllowHttpTransport,
|
shouldAllowHttpTransport: global.settings.byKey.shouldAllowHttpTransport,
|
||||||
shouldForceHttpTransport: global.settings.byKey.shouldForceHttpTransport,
|
shouldForceHttpTransport: global.settings.byKey.shouldForceHttpTransport,
|
||||||
shouldDebugExportedSenders: global.settings.byKey.shouldDebugExportedSenders,
|
shouldDebugExportedSenders: global.settings.byKey.shouldDebugExportedSenders,
|
||||||
|
langCode: global.settings.byKey.language,
|
||||||
});
|
});
|
||||||
|
|
||||||
void setShouldEnableDebugLog(Boolean(global.settings.byKey.shouldCollectDebugLogs));
|
void setShouldEnableDebugLog(Boolean(global.settings.byKey.shouldCollectDebugLogs));
|
||||||
|
|||||||
@ -157,7 +157,7 @@ class TelegramClient {
|
|||||||
.toString() || '1.0',
|
.toString() || '1.0',
|
||||||
appVersion: args.appVersion || '1.0',
|
appVersion: args.appVersion || '1.0',
|
||||||
langCode: args.langCode,
|
langCode: args.langCode,
|
||||||
langPack: '', // this should be left empty.
|
langPack: 'weba',
|
||||||
systemLangCode: args.systemLangCode,
|
systemLangCode: args.systemLangCode,
|
||||||
query: x,
|
query: x,
|
||||||
proxy: undefined, // no proxies yet.
|
proxy: undefined, // no proxies yet.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user