Similar to #18, but for confirmations.
const confirmation = getUserConfirmation(requestPayload))
// { state, metadata })
if (confirmation) {
// send text acknoledging the confirmation choice
response.write(
createTextEvent(
`ok, confirmation.state}!`
).toString()
);
return response.end(createDoneEvent().toString());
}