global update and global fix

This commit is contained in:
lendry
2026-06-25 23:48:57 +03:00
parent 3880c68d59
commit b0ea87e898
121 changed files with 13759 additions and 663 deletions

View File

@@ -0,0 +1,23 @@
export const BOTFATHER_BOT_USERNAME = 'BotFather_bot';
export const BOTFATHER_USER_USERNAME = 'BotFather';
export const BOTFATHER_DISPLAY_NAME = 'BotFather';
export const BOTFATHER_SETTING_USER_ID = 'BOTFATHER_USER_ID';
export const BOTFATHER_SETTING_BOT_ID = 'BOTFATHER_BOT_ID';
export const SYSTEM_BOT_OWNER_EMAIL = 'system-bot-owner@internal.lendry.id';
export function resolvePublicFrontendUrl() {
return (process.env.PUBLIC_FRONTEND_URL ?? 'http://localhost:3002').replace(/\/$/, '');
}
export function buildBotManageWebAppUrl(botId: string) {
return `${resolvePublicFrontendUrl()}/mini-apps/bot-manage?botId=${botId}`;
}
export function buildBotCreateWebAppUrl() {
return `${resolvePublicFrontendUrl()}/mini-apps/bot-create`;
}
export function isBotManageWebAppUrl(url: string | null | undefined) {
if (!url?.trim()) return false;
return url.includes('/mini-apps/bot-manage');
}