Skip to content

Commit

Permalink
Update gocommom
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanseymour committed May 9, 2024
1 parent 33d5a13 commit 520b564
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cmd/transferairtime/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func main() {
os.Exit(1)
}

destination, err := urns.ParsePhone(args[0], "")
destination, err := urns.ParsePhone(args[0], "", false, false)
if err != nil {
fmt.Printf("%s isn't a valid phone number\n", args[0])
os.Exit(1)
Expand Down
2 changes: 1 addition & 1 deletion flows/routers/waits/dial.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func (w *DialWait) Begin(run flows.Run, log flows.EventCallback) bool {
phone, _ := run.EvaluateTemplate(w.phone, log)
country := run.Session().MergedEnvironment().DefaultCountry()

urn, err := urns.ParsePhone(phone, country)
urn, err := urns.ParsePhone(phone, country, false, false)
if err != nil {
log(events.NewError(err))
return false
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/blevesearch/segment v0.9.1
github.com/buger/jsonparser v1.1.1
github.com/go-playground/validator/v10 v10.20.0
github.com/nyaruka/gocommon v1.54.8
github.com/nyaruka/gocommon v1.54.9
github.com/olivere/elastic/v7 v7.0.32
github.com/pkg/errors v0.9.1
github.com/sergi/go-diff v1.3.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=
github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
github.com/nyaruka/gocommon v1.54.8 h1:mYZNY2KRsxhUDDw7ULG/Mui2FfHwuYZB7a+Ronb/Xuk=
github.com/nyaruka/gocommon v1.54.8/go.mod h1:rWkEIpYIK98zL9Qm6PeMXJ+84WcWlArf01RfuWWCYvQ=
github.com/nyaruka/gocommon v1.54.9 h1:BvWgXQc7h9Qlhj347N56wPZiik64SGmv+qSLmar4pVo=
github.com/nyaruka/gocommon v1.54.9/go.mod h1:rWkEIpYIK98zL9Qm6PeMXJ+84WcWlArf01RfuWWCYvQ=
github.com/nyaruka/null/v2 v2.0.3 h1:rdmMRQyVzrOF3Jff/gpU/7BDR9mQX0lcLl4yImsA3kw=
github.com/nyaruka/null/v2 v2.0.3/go.mod h1:OCVeCkCXwrg5/qE6RU0c1oUVZBy+ZDrT+xYg1XSaIWA=
github.com/nyaruka/phonenumbers v1.3.5 h1:WZLbQn61j2E1OFnvpUTYbK/6hViUgl6tppJ55/E2iQM=
Expand Down
4 changes: 2 additions & 2 deletions test/testdata/runner/ivr_dial.invalid_phone.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{
"created_on": "2018-07-06T12:30:02.123456789Z",
"step_uuid": "8720f157-ca1c-432f-9c0b-2014ddc77094",
"text": "the phone number supplied is not a number",
"text": "not a possible number",
"type": "error"
},
{
Expand Down Expand Up @@ -60,7 +60,7 @@
{
"created_on": "2018-07-06T12:30:02.123456789Z",
"step_uuid": "8720f157-ca1c-432f-9c0b-2014ddc77094",
"text": "the phone number supplied is not a number",
"text": "not a possible number",
"type": "error"
},
{
Expand Down
2 changes: 1 addition & 1 deletion utils/phone.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func ParsePhoneNumber(s string, country i18n.Country) string {
return ""
}

formatted, err := urns.ParseNumber(s, country, false)
formatted, err := urns.ParseNumber(s, country, false, false)
if err != nil {
return ""
}
Expand Down

0 comments on commit 520b564

Please sign in to comment.