tsk-11: New code to send message #13

Merged
phoenix merged 5 commits from tsk-11 into main 2026-07-03 00:46:00 -04:00
Showing only changes of commit 65b119a7e1 - Show all commits
+3 -3
View File
@@ -40,15 +40,15 @@ impl SendMsg {
param: &crate::twilio::types::Parameters,
) -> Result<reqwest::Response, std::io::Error> {
if self.recipient.phone_number.is_empty() {
return Err(std::io::Error::other("Recipient not provided"));
Err(std::io::Error::other("Recipient not provided"))
} else if self.message.content.is_empty() {
return Err(std::io::Error::other("Message not provided"));
Err(std::io::Error::other("Message not provided"))
} else if self.config.phone_number.is_empty()
|| self.config.service_sid.is_empty()
|| self.config.auth_token.is_empty()
|| self.config.auth_sid.is_empty()
{
return Err(std::io::Error::other("Config not populated"));
Err(std::io::Error::other("Config not populated"))
} else {
let client = match reqwest::Client::builder().build() {
Ok(client) => client,