diff --git a/apps/bot/src/household-setup.ts b/apps/bot/src/household-setup.ts index 880f71b..a9a3ec2 100644 --- a/apps/bot/src/household-setup.ts +++ b/apps/bot/src/household-setup.ts @@ -52,7 +52,6 @@ export function registerHouseholdSetupCommands(options: { bot: Bot householdSetupService: HouseholdSetupService householdOnboardingService: HouseholdOnboardingService - miniAppBaseUrl?: string logger?: Logger }): void { options.bot.command('start', async (ctx) => { @@ -161,43 +160,22 @@ export function registerHouseholdSetupCommands(options: { const joinDeepLink = ctx.me.username ? `https://t.me/${ctx.me.username}?start=join_${encodeURIComponent(joinToken.token)}` : null - const joinMiniAppUrl = options.miniAppBaseUrl - ? (() => { - const url = new URL(options.miniAppBaseUrl) - url.searchParams.set('join', joinToken.token) - if (ctx.me.username) { - url.searchParams.set('bot', ctx.me.username) - } - return url.toString() - })() - : null - await ctx.reply( [ `Household ${action}: ${result.household.householdName}`, `Chat ID: ${result.household.telegramChatId}`, 'Next: open the purchase topic and run /bind_purchase_topic, then open the feedback topic and run /bind_feedback_topic.', - 'Members can join from the button below or from the bot link.' + 'Members should open the bot chat from the button below and confirm the join request there.' ].join('\n'), - joinMiniAppUrl || joinDeepLink + joinDeepLink ? { reply_markup: { inline_keyboard: [ [ - ...(joinMiniAppUrl - ? [ - { - text: 'Join household', - web_app: { - url: joinMiniAppUrl - } - } - ] - : []), ...(joinDeepLink ? [ { - text: 'Open bot chat', + text: 'Join household', url: joinDeepLink } ] diff --git a/apps/bot/src/index.ts b/apps/bot/src/index.ts index c2d205a..527d739 100644 --- a/apps/bot/src/index.ts +++ b/apps/bot/src/index.ts @@ -130,11 +130,6 @@ if (householdConfigurationRepositoryClient) { householdConfigurationRepositoryClient.repository ), householdOnboardingService: householdOnboardingService!, - ...(runtime.miniAppAllowedOrigins[0] - ? { - miniAppBaseUrl: runtime.miniAppAllowedOrigins[0] - } - : {}), logger: getLogger('household-setup') }) } else {