Compare commits

..
Author SHA1 Message Date
phoenix 768b2b6d08 tsk-11: New code to send message (#13)
Release Tagging / release (push) Successful in 46s
swoosh Build / Rustfmt (push) Successful in 32s
swoosh Build / Test Suite (push) Successful in 1m34s
swoosh Build / Check (push) Successful in 1m52s
swoosh Build / Clippy (push) Successful in 1m28s
swoosh Build / build (push) Successful in 1m15s
Closes #11

Reviewed-on: #13
2026-07-03 00:45:59 -04:00
+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,