From 2adb5bb500bdc5b58ce1606667ac85be5a6ad96b Mon Sep 17 00:00:00 2001 From: Joe Carstairs <65492573+Sycamost@users.noreply.github.com> Date: Thu, 7 Mar 2024 22:53:09 +0000 Subject: Only forwards texts to other people --- src/app.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/app.js b/src/app.js index 1e2ae98..336eb9f 100644 --- a/src/app.js +++ b/src/app.js @@ -28,8 +28,7 @@ app.post('/sms', (req, res) => { if (isSubscribed(senderPhoneNumber)) { const senderSubscription = getSubscriptionFromNumber(senderPhoneNumber); - // TODO: enable filter. Just disabling so I can get the forwarded text to my own phone to check it works. - const otherSubscriptions = getSubscriptions()/* .filter(sub => sub.number != senderPhoneNumber) */; + const otherSubscriptions = getSubscriptions().filter(sub => sub.number !== senderPhoneNumber); const forwardedMessage = `${senderSubscription.name} said: ${body}`; sendTextMessage(otherSubscriptions, forwardedMessage); -- cgit v1.2.3