sms_user_get_uid() fails if the incoming number has the country code

Created on 17 March 2017, about 8 years ago
Updated 10 December 2024, 5 months ago

I have a webhook set up with Twilio to respond to incoming SMS requests, and the number sent by Twilio includes the country code; e.g., "+16175551234". However, the number is stored in the sms_user table without the country code, so sms_user_get_uid() always fails for me.

It seems the way to fix this is to first check for the number as is. If that fails to find a user, sms_user_get_uid() should try again, taking the country code into account (I see that, for Twilio at least, the gateway column stores the country).

The other, lazier option is to add query tags to the db_select query so that it can be altered.

I've done the latter locally but would be willing to help with the former if the patch will be released.

πŸ› Bug report
Status

Closed: outdated

Version

1.0

Component

SMS User

Created by

πŸ‡ΊπŸ‡ΈUnited States venutip

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024