Why removing country code in receiveMessage()?

Created on 15 July 2025, about 1 month ago

Problem/Motivation

In the function \Drupal\twilio\Controller\TwilioController::receiveMessage(), the country code is removing with this code:

$number = Html::escape(str_replace('+' . $dial_code, '', $this->requestStack->getCurrentRequest()->get('From')));

Can I ask why? Because we need the country code to send messages to this numbers, so we store the numbers in drupal itself, but the number received in the hook HOOK_twilio_message_incoming() the country code is missing because of the code above.

💬 Support request
Status

Active

Component

Code

Created by

🇨🇭Switzerland handkerchief

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

Comments & Activities

Production build 0.71.5 2024