From 385396649c2041ef8037b66f29b05af09422ae50 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Mon, 7 Apr 2025 08:28:53 +0000 Subject: [PATCH] chore: init inforu adapter --- composer.lock | 8 ++++---- src/Appwrite/Platform/Workers/Messaging.php | 11 +++++++++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/composer.lock b/composer.lock index a59bd79bb2..9d23ef6219 100644 --- a/composer.lock +++ b/composer.lock @@ -3904,12 +3904,12 @@ "source": { "type": "git", "url": "https://github.com/utopia-php/messaging.git", - "reference": "c5eab46c1b9d23227135c8efe1793003a07d5f4d" + "reference": "f1ea63c698806effbada520455fd892ed47f4221" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/messaging/zipball/c5eab46c1b9d23227135c8efe1793003a07d5f4d", - "reference": "c5eab46c1b9d23227135c8efe1793003a07d5f4d", + "url": "https://api.github.com/repos/utopia-php/messaging/zipball/f1ea63c698806effbada520455fd892ed47f4221", + "reference": "f1ea63c698806effbada520455fd892ed47f4221", "shasum": "" }, "require": { @@ -3947,7 +3947,7 @@ "issues": "https://github.com/utopia-php/messaging/issues", "source": "https://github.com/utopia-php/messaging/tree/feat-inforu-adapter" }, - "time": "2025-04-07T05:21:46+00:00" + "time": "2025-04-07T08:27:18+00:00" }, { "name": "utopia-php/migration", diff --git a/src/Appwrite/Platform/Workers/Messaging.php b/src/Appwrite/Platform/Workers/Messaging.php index cf2b8bfc84..95d4f15fb9 100644 --- a/src/Appwrite/Platform/Workers/Messaging.php +++ b/src/Appwrite/Platform/Workers/Messaging.php @@ -24,6 +24,7 @@ use Utopia\Messaging\Adapter\Push\FCM; use Utopia\Messaging\Adapter\SMS as SMSAdapter; use Utopia\Messaging\Adapter\SMS\Fast2SMS; 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\Telesign; @@ -455,6 +456,11 @@ class Messaging extends Action $credentials['messageId'] ?? '', $credentials['useDLT'] ?? true ), + 'inforu' => new Inforu( + $credentials['username'] ?? '', + $credentials['apiKey'] ?? '', + $credentials['sender'] ?? '', + ), default => null }; } @@ -780,6 +786,11 @@ class Messaging extends Action 'messageId' => $dsn->getParam('messageId'), 'useDLT' => $dsn->getParam('useDLT'), ], + 'inforu' => [ + 'username' => $user, + 'apiKey' => $password, + 'sender' => $dsn->getParam('sender', $from), + ], default => null }, 'options' => match ($host) {