From 96ca4dc77f783c11b12111fbd0a54219f7448113 Mon Sep 17 00:00:00 2001 From: Joe Carstairs <65492573+Sycamost@users.noreply.github.com> Date: Thu, 7 Mar 2024 22:01:20 +0000 Subject: not subscribed path --- src/app.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/app.js b/src/app.js index 0e88902..51e2eb4 100644 --- a/src/app.js +++ b/src/app.js @@ -53,6 +53,14 @@ app.post('/sms', (req, res) => { to and from the group. `; sendTextMessage([subscription], welcomeMessage); + } else { + const twiml = new MessagingResponse(); + twiml.message(` + You are not subscribed to this texting group. To subscribe, send a + text to this number with this syntax: my name is + `); + res.type('text/xml').send(twiml.toString()); + return; } } -- cgit v1.2.3