summaryrefslogtreecommitdiff
path: root/src/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/app.js')
-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;
}
}