diff --git a/apps/bot/src/bot/features/registration.ts b/apps/bot/src/bot/features/registration.ts index 745de66..4a8f91b 100644 --- a/apps/bot/src/bot/features/registration.ts +++ b/apps/bot/src/bot/features/registration.ts @@ -1,6 +1,6 @@ import { type Context } from '@/bot/context'; import { logHandle } from '@/bot/helpers/logging'; -import { KEYBOARD_REMOVE } from '@/config/keyboards'; +import { KEYBOARD_REMOVE, mainMenu } from '@/config/keyboards'; import { isValidPhoneNumber, normalizePhoneNumber } from '@/utils/phone'; import { CustomersService } from '@repo/graphql/api/customers'; import { RegistrationService } from '@repo/graphql/api/registration'; @@ -50,9 +50,8 @@ feature.on(':contact', logHandle('contact-registration'), async (ctx) => { documentId: customer.documentId, }); - return ctx.reply(ctx.t('msg-phone-saved') + '\n\n' + ctx.t('commands-list'), { - ...KEYBOARD_REMOVE, - parse_mode: 'HTML', + return ctx.reply(ctx.t('msg-phone-saved'), { + reply_markup: mainMenu, }); } @@ -67,9 +66,8 @@ feature.on(':contact', logHandle('contact-registration'), async (ctx) => { documentId, }); - return ctx.reply(ctx.t('msg-phone-saved') + '\n\n' + ctx.t('commands-list'), { - ...KEYBOARD_REMOVE, - parse_mode: 'HTML', + return ctx.reply(ctx.t('msg-phone-saved'), { + reply_markup: mainMenu, }); } catch (error) { return ctx.reply(ctx.t('err-with-details', { error: String(error) })); diff --git a/apps/bot/src/bot/features/welcome.ts b/apps/bot/src/bot/features/welcome.ts index 2f66bff..7bce81f 100644 --- a/apps/bot/src/bot/features/welcome.ts +++ b/apps/bot/src/bot/features/welcome.ts @@ -1,7 +1,6 @@ import { type Context } from '@/bot/context'; import { logHandle } from '@/bot/helpers/logging'; import { KEYBOARD_SHARE_PHONE, mainMenu } from '@/config/keyboards'; -import { combine } from '@/utils/messages'; import { RegistrationService } from '@repo/graphql/api/registration'; import { Composer } from 'grammy'; @@ -17,7 +16,7 @@ feature.command('start', logHandle('command-start'), async (ctx) => { if (customer) { // Пользователь уже зарегистрирован — приветствуем - return ctx.reply(combine(ctx.t('msg-welcome-back', { name: customer.name })), { + return ctx.reply(ctx.t('msg-welcome-back', { name: customer.name }), { reply_markup: mainMenu, }); }