function handleMessage()

in inter-page/support-bot/app.js [96:112]


function handleMessage(sender_psid, received_message) {
    let response;

    if (received_message.text.replace(/[^\w\s]/gi, '').trim().toLowerCase()) {
        response = {
            "text": `You sent the message: "${received_message.text}".`
        };

    } else {
        response = {
            "text": `Sorry, I don't understand what you mean.`
        }
    }

    // Send the response message
    callSendAPI(sender_psid, response);
}