Fix contact form action processing for "reset" being nested incorrectly

This commit is contained in:
badblocks 2026-07-02 11:48:35 -07:00
parent e010ac2fd7
commit 6e7977997e
Signed by: badblocks
SSH key fingerprint: SHA256:hEcM6BP4hKm9F7WsomNuXSBpPn2BSDnFzPSl3y1NerQ

View file

@ -167,20 +167,20 @@ const submitActionDefinition = {
return {
nextAction: "complete",
};
} else if (input.action === "reset") {
context.session?.delete("phone");
context.session?.delete("name");
context.session?.delete("msg");
return {
nextAction: "send_otp",
};
}
throw new ActionError({
code: "SERVICE_UNAVAILABLE",
message: "Message failed to send.",
});
} else if (input.action === "reset") {
context.session?.delete("phone");
context.session?.delete("name");
context.session?.delete("msg");
return {
nextAction: "send_otp",
};
}
},
};