global update and global fix
This commit is contained in:
23
apps/sso-core/src/domain/bot/bot-father.constants.ts
Normal file
23
apps/sso-core/src/domain/bot/bot-father.constants.ts
Normal 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');
|
||||
}
|
||||
Reference in New Issue
Block a user