mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-03 17:52:12 +01:00
ProductChosen
=> ReceiveProductChoice
This commit is contained in:
parent
a60e19a8c2
commit
bc0e9b19a4
1 changed files with 3 additions and 3 deletions
|
@ -26,7 +26,7 @@ type HandlerResult = Result<(), Box<dyn std::error::Error + Send + Sync>>;
|
|||
pub enum State {
|
||||
Start,
|
||||
ReceiveFullName,
|
||||
ProductChosen { full_name: String },
|
||||
ReceiveProductChoice { full_name: String },
|
||||
}
|
||||
|
||||
impl Default for State {
|
||||
|
@ -60,7 +60,7 @@ async fn main() {
|
|||
)
|
||||
.branch(
|
||||
Update::filter_callback_query().chain(
|
||||
teloxide::handler![State::ProductChosen { full_name }]
|
||||
teloxide::handler![State::ReceiveProductChoice { full_name }]
|
||||
.endpoint(receive_product_selection),
|
||||
),
|
||||
)
|
||||
|
@ -107,7 +107,7 @@ async fn receive_full_name(
|
|||
);
|
||||
|
||||
bot.send_message(msg.chat.id, "Select a product:").reply_markup(products).await?;
|
||||
dialogue.update(State::ProductChosen { full_name }).await?;
|
||||
dialogue.update(State::ReceiveProductChoice { full_name }).await?;
|
||||
}
|
||||
None => {
|
||||
bot.send_message(msg.chat.id, "Please, send me your full name.").await?;
|
||||
|
|
Loading…
Reference in a new issue