feat: add Messenger class for multiple adapter failover + Vonage Messages API adapter#14
Open
deepshekhardas wants to merge 3 commits into
Open
feat: add Messenger class for multiple adapter failover + Vonage Messages API adapter#14deepshekhardas wants to merge 3 commits into
deepshekhardas wants to merge 3 commits into
Conversation
added 3 commits
March 16, 2026 17:56
Alibaba SMS signature validation requires query parameters, not body. Moved signature params from request body to URL query string. Identified by cubic (cubic.dev)
…ages API adapter - Add Utopia\Messaging\Messenger class for automatic failover across multiple adapters - Accepts single Adapter or Adapter[] - Tries adapters sequentially on exception - Validates adapter compatibility (same type and message type) - Returns first successful response or throws aggregated exception - Add VonageMessages adapter using Vonage Messages API (v1) - Uses Basic auth (Base64 encoded API Key:Secret) - JSON body with channel: SMS, message_type: text - Treats HTTP 202 as delivered - Rename Vonage to VonageLegacy (legacy SMS API) - Keeps backwards compatibility for existing users - Add tests: MessengerTest (14 cases), VonageMessagesTest, VonageLegacyTest
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces the
Messengerclass for automatic failover across multiple messaging adapters and adds a new Vonage Messages API adapter.Changes
1. Messenger Class (
src/Utopia/Messaging/Messenger.php)Adapteror an array ofAdapter[]2. VonageMessages Adapter (
src/Utopia/Messaging/Adapter/SMS/VonageMessages.php)channel: SMS,message_type: text3. VonageLegacy (
src/Utopia/Messaging/Adapter/SMS/VonageLegacy.php)Test Plan
Related Issues
Summary by cubic
Adds a
Messengerfor automatic failover across multiple messaging adapters to improve delivery reliability. Also introduces aVonageMessagesSMS adapter and anAlibabaCloudSMS adapter, while keeping the legacy Vonage SMS API asVonageLegacy.New Features
Messengersupports one or many adapters, tries them in order, returns first success, and aggregates errors.getMaxMessagesPerRequest.VonageMessages(v1) adapter with Basic auth; JSON payload; HTTP 202 is treated as success.VonageLegacyadapter for the legacy Vonage SMS API.AlibabaCloudSMS adapter.Bug Fixes
Written for commit 135a974. Summary will update on new commits.