Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: geosms adapter #64

Merged
merged 18 commits into from
Nov 10, 2023
Merged

feat: geosms adapter #64

merged 18 commits into from
Nov 10, 2023

Conversation

loks0n
Copy link
Contributor

@loks0n loks0n commented Nov 7, 2023

GEO aware SMS adapter that has Twilio as a global default but can also delegate work to local providers.

$sms = new GEOSMS(new Twilio(...)); // Twilio as default fallback

$sms
    ->setLocal('+91', new MSG91())
    ->setLocal('+44', new Vodafone())

@@ -30,5 +31,8 @@ public function testSendEmail()
$response = $sender->send($message);

$this->assertEquals($response, '');
*/

$this->markTestSkipped('Sendgrid: Authenticated user is not authorized to send mail');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to fix our Sendgrid setup

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@christyjacob4 Do we have a team test account set up for Sendgrid? I think tests here are still using a personal account

// $this->assertEquals('success', $result['type']);

$this->markTestSkipped('Msg91 requires business verification to use template and SMS api.');
$this->assertEquals('success', $result['type']);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is fixed now we are verified

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://api.msg91.com/apidoc/textsms/send-sms-flow.php
I removed this check since the message property is not really the content instead some sort of an ID that we cannot use for assertion

@loks0n loks0n requested a review from eldadfux November 7, 2023 15:08
src/Utopia/Messaging/Adapters/SMS/GEOSMS.php Outdated Show resolved Hide resolved
src/Utopia/Messaging/Adapters/SMS/GEOSMS.php Outdated Show resolved Hide resolved
src/Utopia/Messaging/Adapters/SMS/GEOSMS.php Outdated Show resolved Hide resolved
src/Utopia/Messaging/Adapters/SMS/GEOSMS.php Outdated Show resolved Hide resolved
src/Utopia/Messaging/Adapters/SMS/GEOSMS.php Outdated Show resolved Hide resolved
src/Utopia/Messaging/Adapters/SMS/GEOSMS.php Show resolved Hide resolved
src/Utopia/Messaging/Adapters/SMS/GEOSMS.php Outdated Show resolved Hide resolved
@@ -30,5 +31,8 @@ public function testSendEmail()
$response = $sender->send($message);

$this->assertEquals($response, '');
*/

$this->markTestSkipped('Sendgrid: Authenticated user is not authorized to send mail');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@christyjacob4 Do we have a team test account set up for Sendgrid? I think tests here are still using a personal account

src/Utopia/Messaging/Adapters/SMS/GEOSMS.php Outdated Show resolved Hide resolved
@loks0n loks0n requested a review from stnguyen90 November 8, 2023 14:18
@abnegate abnegate merged commit 8ba50f7 into main Nov 10, 2023
2 checks passed
@abnegate abnegate deleted the feat-geosms-adapter branch November 10, 2023 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants