Skip to content

Commit

Permalink
unlock quick_replay payload
Browse files Browse the repository at this point in the history
  • Loading branch information
j03-dev committed Oct 14, 2023
1 parent 8e1df66 commit fd9b823
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/core/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,20 @@ pub async fn webhook_core(data: Json<MsgFromFb>, state: &State<AppState>) -> &'s
.await
.expect("failed to get action");
if let Some(message) = data.get_message() {
if action.ne("lock") {
if let Some(quick_reply) = message.get_quick_reply() {
let uri_payload = quick_reply.get_payload();
execute_payload(user_id, uri_payload, user_conn).await;
} else {
if let Some(quick_reply) = message.get_quick_reply() {
let uri_payload = quick_reply.get_payload();
execute_payload(user_id, uri_payload, user_conn).await;
} else {
if action.ne("lock") {
if let Some(action_fn) = ACTION_REGISTRY.lock().await.get(action.as_str()) {
user_conn.set_action(user_id, "lock").await;
action_fn
.execute(user_id, &message.get_text(), user_conn)
.await;
}
} else {
user_conn.reset_action(user_id).await;
}
} else {
user_conn.reset_action(user_id).await;
}
} else if let Some(postback) = data.get_postback() {
let uri_payload = postback.get_payload();
Expand Down

0 comments on commit fd9b823

Please sign in to comment.