user catalog navigation upgrade
This commit is contained in:
parent
21465022b3
commit
a575f75faf
@ -240,8 +240,13 @@ export default class UserProductHandler {
|
||||
}
|
||||
);
|
||||
|
||||
// Удаляем состояние пользователя
|
||||
userStates.delete(chatId);
|
||||
// Сохраняем состояние пользователя
|
||||
userStates.set(chatId, {
|
||||
...state,
|
||||
action: 'viewing_category',
|
||||
categoryId,
|
||||
location: state?.location // Сохраняем информацию о локации
|
||||
});
|
||||
} catch (error) {
|
||||
console.error('Error in handleCategorySelection:', error);
|
||||
await bot.sendMessage(chatId, 'Error loading products. Please try again.');
|
||||
@ -388,7 +393,8 @@ export default class UserProductHandler {
|
||||
productId,
|
||||
quantity: 1,
|
||||
photoMessageId: photoMessage ? photoMessage.message_id : null,
|
||||
productMessageId: productMessage.message_id
|
||||
productMessageId: productMessage.message_id,
|
||||
location: state?.location // Сохраняем информацию о локации
|
||||
});
|
||||
} catch (error) {
|
||||
console.error('Error in handleProductSelection:', error);
|
||||
|
Loading…
Reference in New Issue
Block a user