Compare commits

..
Author SHA1 Message Date
phoenix 96705b62bd tsk-1: Workflow tweaks 2025-11-24 15:08:32 -05:00
phoenix fee631d596 tsk-1: textsender-models version bump 2025-11-24 15:07:34 -05:00
phoenix 1258becb70 tsk-1: Updated go version in the workflows 2025-11-24 15:06:28 -05:00
phoenix 8a33bdd0c6 tsk-1: Updated go version 2025-11-24 15:06:14 -05:00
3 changed files with 7 additions and 10 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ module git.kundeng.us/phoenix/swoosh
go 1.25.4 go 1.25.4
require ( require (
git.kundeng.us/phoenix/textsender-models v0.0.10 git.kundeng.us/phoenix/textsender-models v0.0.9
github.com/twilio/twilio-go v1.28.6 github.com/twilio/twilio-go v1.28.6
) )
+2 -2
View File
@@ -1,5 +1,5 @@
git.kundeng.us/phoenix/textsender-models v0.0.10 h1:0AMe/zm4Xte2BcuqqhRP7+42m+4To+rUnHkR2a9eXlI= git.kundeng.us/phoenix/textsender-models v0.0.9 h1:wHEbDLYzMpXQ8OaIf05xFY1V19iTpQogTJEuKInkjEQ=
git.kundeng.us/phoenix/textsender-models v0.0.10/go.mod h1:9iPDQJg1Tc6WMNoW5+f8YKmnosMwlWHJ++hmxNLDEe0= git.kundeng.us/phoenix/textsender-models v0.0.9/go.mod h1:9iPDQJg1Tc6WMNoW5+f8YKmnosMwlWHJ++hmxNLDEe0=
github.com/beevik/etree v1.1.0/go.mod h1:r8Aw8JqVegEf0w2fDnATrX9VpkMcyFeM0FhwO62wh+A= github.com/beevik/etree v1.1.0/go.mod h1:r8Aw8JqVegEf0w2fDnATrX9VpkMcyFeM0FhwO62wh+A=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+4 -7
View File
@@ -5,9 +5,9 @@ import (
"fmt" "fmt"
"time" "time"
"git.kundeng.us/phoenix/textsender-models/tx0/config" "git.kundeng.us/phoenix/textsender-models/pkg/config"
"git.kundeng.us/phoenix/textsender-models/tx0/contact" "git.kundeng.us/phoenix/textsender-models/pkg/contact"
"git.kundeng.us/phoenix/textsender-models/tx0/message" "git.kundeng.us/phoenix/textsender-models/pkg/message"
"github.com/twilio/twilio-go" "github.com/twilio/twilio-go"
twilioApi "github.com/twilio/twilio-go/rest/api/v2010" twilioApi "github.com/twilio/twilio-go/rest/api/v2010"
@@ -15,13 +15,10 @@ import (
) )
type MessageSender struct { type MessageSender struct {
Config *config.TwiloConfig Config config.TwiloConfig
} }
func (m *MessageSender) Send(msg message.Message, number contact.Contact, sendTime *time.Time) (*types.TwilioResult, error) { func (m *MessageSender) Send(msg message.Message, number contact.Contact, sendTime *time.Time) (*types.TwilioResult, error) {
if m.Config == nil {
return fmt.Errorf("Config has not been initialized")
}
now := time.Now() now := time.Now()
client := twilio.NewRestClientWithParams(twilio.ClientParams{ client := twilio.NewRestClientWithParams(twilio.ClientParams{
Username: m.Config.AccountSID, Username: m.Config.AccountSID,