diff --git a/composer.json b/composer.json index 21432398af..2a1499f1a8 100644 --- a/composer.json +++ b/composer.json @@ -76,7 +76,7 @@ "utopia-php/locale": "0.8.*", "utopia-php/lock": "0.2.*", "utopia-php/logger": "0.8.*", - "utopia-php/messaging": "^1.1", + "utopia-php/messaging": "^1.2", "utopia-php/migration": "1.14.*", "utopia-php/platform": "^1.0@RC", "utopia-php/pools": "1.*", diff --git a/composer.lock b/composer.lock index d3bee71eb6..652b26e041 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "2c365042d311895a9cddaceca7623b1e", + "content-hash": "508b3e633843d61eb24f864fd8832db0", "packages": [ { "name": "adhocore/jwt", @@ -4348,16 +4348,16 @@ }, { "name": "utopia-php/messaging", - "version": "1.1.0", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/utopia-php/messaging.git", - "reference": "2a8e82cda89b373833e10923ae959f56466300a3" + "reference": "3419ffbbeb242b3232b588430bd465024959720c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/messaging/zipball/2a8e82cda89b373833e10923ae959f56466300a3", - "reference": "2a8e82cda89b373833e10923ae959f56466300a3", + "url": "https://api.github.com/repos/utopia-php/messaging/zipball/3419ffbbeb242b3232b588430bd465024959720c", + "reference": "3419ffbbeb242b3232b588430bd465024959720c", "shasum": "" }, "require": { @@ -4394,9 +4394,9 @@ ], "support": { "issues": "https://github.com/utopia-php/messaging/issues", - "source": "https://github.com/utopia-php/messaging/tree/1.1.0" + "source": "https://github.com/utopia-php/messaging/tree/1.2.0" }, - "time": "2026-06-16T03:44:58+00:00" + "time": "2026-06-23T04:24:43+00:00" }, { "name": "utopia-php/migration", diff --git a/src/Appwrite/Platform/Workers/Messaging.php b/src/Appwrite/Platform/Workers/Messaging.php index 2a827f82cb..92745a0f91 100644 --- a/src/Appwrite/Platform/Workers/Messaging.php +++ b/src/Appwrite/Platform/Workers/Messaging.php @@ -33,6 +33,7 @@ use Utopia\Messaging\Adapter\SMS\GEOSMS; use Utopia\Messaging\Adapter\SMS\Inforu; use Utopia\Messaging\Adapter\SMS\Mock; use Utopia\Messaging\Adapter\SMS\Msg91; +use Utopia\Messaging\Adapter\SMS\Msg91\MetadataParameter; use Utopia\Messaging\Adapter\SMS\Telesign; use Utopia\Messaging\Adapter\SMS\TextMagic; use Utopia\Messaging\Adapter\SMS\Twilio; @@ -824,6 +825,10 @@ class Messaging extends Action ); $sms->setOrigin(MESSAGE_SEND_TYPE_INTERNAL); + // Attach the project ID so the SMS provider's delivery logs and + // webhooks can be attributed back to the originating project. + $sms->setMetadata([MetadataParameter::UUID->value => $project->getId()]); + $this->adapter->send($sms); }