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.
This commit is contained in:
vchikalkin 2025-09-20 12:44:27 +03:00
parent 80d29af1b4
commit d9e67bf4ba

View File

@ -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) }));
}