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 {
|
||||
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,
|
||||
);
|
||||
|
||||
|
||||
@ -15,6 +15,7 @@ export interface ApiInitialArgs {
|
||||
shouldAllowHttpTransport?: boolean;
|
||||
shouldForceHttpTransport?: boolean;
|
||||
shouldDebugExportedSenders?: boolean;
|
||||
langCode: string;
|
||||
}
|
||||
|
||||
export interface ApiOnProgress {
|
||||
|
||||
@ -532,7 +532,7 @@ const WebAppModal: FC<OwnProps & StateProps> = ({
|
||||
>
|
||||
<div className={backButtonClassName} />
|
||||
</Button>
|
||||
<div className="modal-title">{bot?.firstName}</div>
|
||||
<div className="modal-title">{attachBot?.shortName ?? bot?.firstName}</div>
|
||||
<DropdownMenu
|
||||
className="web-app-more-menu with-menu-transitions"
|
||||
trigger={MoreMenuButton}
|
||||
|
||||
@ -60,6 +60,7 @@ addActionHandler('initApi', async (global, actions): Promise<void> => {
|
||||
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));
|
||||
|
||||
@ -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.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user