Fix contact form action processing for "reset" being nested incorrectly
This commit is contained in:
parent
e010ac2fd7
commit
6e7977997e
1 changed files with 8 additions and 8 deletions
|
|
@ -167,6 +167,12 @@ const submitActionDefinition = {
|
|||
return {
|
||||
nextAction: "complete",
|
||||
};
|
||||
}
|
||||
|
||||
throw new ActionError({
|
||||
code: "SERVICE_UNAVAILABLE",
|
||||
message: "Message failed to send.",
|
||||
});
|
||||
} else if (input.action === "reset") {
|
||||
context.session?.delete("phone");
|
||||
context.session?.delete("name");
|
||||
|
|
@ -176,12 +182,6 @@ const submitActionDefinition = {
|
|||
nextAction: "send_otp",
|
||||
};
|
||||
}
|
||||
|
||||
throw new ActionError({
|
||||
code: "SERVICE_UNAVAILABLE",
|
||||
message: "Message failed to send.",
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue