-
Notifications
You must be signed in to change notification settings - Fork 62
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
Added Termii messaging adapter #52
base: main
Are you sure you want to change the base?
Added Termii messaging adapter #52
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great PR! 🤯 We left some comments during the review, please check them out.
*/ | ||
private function getRequestBody(array $to, string $text, string $from = null): array | ||
{ | ||
$from = $from ?? ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's okay to pass an empty string for from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it will throw exception as Invalid Sender Id
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And what if null is passed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, sorry for late reply. I was busy on some office work.
If null/empty from passed then also it will throw exception
Exception: {"message":"The given data was invalid.","errors":{"from":["The from field is required."]}}
if (count($to) == 1) { | ||
$to = $to[0]; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do they not accept an array with 1 element?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure about that, based on the documentation they just mentioned that to send to multiple numbers we need to pass as array
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to test and see so that you can clean up this code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, I am unable to test the service anymore as my account balance is low. Termii does not provide free testing and since I am testing from India cost is high.
Exception: {"message":"Insufficient balance"}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make sure to attach screenshots of successful tests to the PR
if (count($to) == 1) { | ||
$to = $to[0]; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to test and see so that you can clean up this code.
Hello @biswajit287 Thank you for your contribution to Hacktoberfest 2023! We've noticed that your PR is still pending and requires some updates based on our engineering team's feedback. We would love to see your PR successfully merged and send you the Appwrite swag as a token of appreciation. To remain eligible for the swag, please address the pending suggestions by Friday, November 17th. If the PR isn't updated by then, we will unfortunately have to close it due to the end of the Hacktoberfest event. |
Hi @stnguyen90 , I'll not be able to attach sreenshots of succesfull test as I'm unable to test the service anymore. My account balance is low. Termii does not provide free testing and since I am using from India cost is high.
|
Hey there! There were a lot of big PRs during this Hacktoberfest, and we wanted to give everyone ample time to collaborate with our engineering team. If you were able to merge your PRs during October, amazing. If it’s still not merged, don’t worry about it either. Either way, we’ve got your Hacktoberfest swag minted and ready to ship. Please comment with your Discord username here so we can contact you about your shipping information to deliver your Hacktoberfest swag. |
Hi @gewenyu99, |
Will reach out soon. Compiling everyone's user names. Thank you so much! |
What does this PR do?
This Pull Request (PR) adds Termii messaging adapter along with tests.
Test Plan
Create Your Termii Account
Obtain API Key
Create Sender Id (For Sending message)
Set Environment Variables and Run E2E Tests
Before running end-to-end (E2E) tests, make sure you have the following environment variables set:
TERMII_API_KEY
TERMII_TO
TERMII_FROM
Execute the following command to run the E2E tests:
Related PRs and Issues
Closes appwrite/appwrite#6864
Have you read the Contributing Guidelines on issues?
Yes