summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Carstairs <65492573+Sycamost@users.noreply.github.com>2024-03-07 22:01:20 +0000
committerJoe Carstairs <65492573+Sycamost@users.noreply.github.com>2024-03-07 22:01:20 +0000
commit96ca4dc77f783c11b12111fbd0a54219f7448113 (patch)
tree7c3fc94f0b0e3dad268d959a21ba02f59f52e112
parenta3c751d3f1fe4030d514be4db90d577499d0bd85 (diff)
not subscribed path
-rw-r--r--src/app.js8
1 files changed, 8 insertions, 0 deletions
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 <your name>
+ `);
+ res.type('text/xml').send(twiml.toString());
+ return;
}
}