summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Carstairs <65492573+Sycamost@users.noreply.github.com>2024-03-07 22:53:09 +0000
committerJoe Carstairs <65492573+Sycamost@users.noreply.github.com>2024-03-07 22:53:09 +0000
commit2adb5bb500bdc5b58ce1606667ac85be5a6ad96b (patch)
tree1e3ae437bb34f088cb143f34323d9417ee08b816
parent92435d3844c7ba35917ec4eb9106d57f15499249 (diff)
Only forwards texts to other people
-rw-r--r--src/app.js3
1 files changed, 1 insertions, 2 deletions
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);