diff options
| -rw-r--r-- | src/app.js | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -37,7 +37,7 @@ app.post('/sms', (req, res) => { sendTextMessage([senderSubscription], confirmationMessage); } else { if (body.toLocaleLowerCase().startsWith('my name is ') || body.toLocaleLowerCase().startsWith('my name is: ')) { - const senderName = body.matchAll(/^my name is:? (.*)$/)?.next()?.[1]; + const senderName = body.matchAll(/^my name is:? (.*)$/g)?.next()?.[1]; if (!senderName) { const twiml = new MessagingResponse(); |
