From d9e67bf4ba195ef7d1bd531f6f16fff40e5854d4 Mon Sep 17 00:00:00 2001 From: vchikalkin Date: Sat, 20 Sep 2025 12:44:27 +0300 Subject: [PATCH] Refactor registration feature to improve reply handling - Updated the registration feature to use KEYBOARD_REMOVE before sending the support message, enhancing user interaction flow. - Ensured consistent reply structure by replacing direct message returns with await calls for better asynchronous handling. --- apps/bot/src/bot/features/registration.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/bot/src/bot/features/registration.ts b/apps/bot/src/bot/features/registration.ts index 4a8f91b..998df62 100644 --- a/apps/bot/src/bot/features/registration.ts +++ b/apps/bot/src/bot/features/registration.ts @@ -50,9 +50,9 @@ feature.on(':contact', logHandle('contact-registration'), async (ctx) => { documentId: customer.documentId, }); - return ctx.reply(ctx.t('msg-phone-saved'), { - reply_markup: mainMenu, - }); + await ctx.reply(ctx.t('msg-phone-saved'), { ...KEYBOARD_REMOVE }); + + return ctx.reply(ctx.t('support'), { reply_markup: mainMenu }); } // Новый пользователь — создаём и активируем @@ -66,9 +66,9 @@ feature.on(':contact', logHandle('contact-registration'), async (ctx) => { documentId, }); - return ctx.reply(ctx.t('msg-phone-saved'), { - reply_markup: mainMenu, - }); + await ctx.reply(ctx.t('msg-phone-saved'), { ...KEYBOARD_REMOVE }); + + return ctx.reply(ctx.t('support'), { reply_markup: mainMenu }); } catch (error) { return ctx.reply(ctx.t('err-with-details', { error: String(error) })); }