Skip to content

Commit

Permalink
Merge pull request #1282 from nyaruka/airtime-to-wa-urn
Browse files Browse the repository at this point in the history
Enable to send airtime to WhatsApp URNs
  • Loading branch information
rowanseymour authored Aug 19, 2024
2 parents b207dbd + a123122 commit c2241db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flows/actions/transfer_airtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ func (a *TransferAirtimeAction) transfer(run flows.Run, logEvent flows.EventCall
// fail if we don't have a contact
contact := run.Contact()

// fail if the contact doesn't have a phone URN
telURNs := contact.URNs().WithScheme(urns.Phone.Prefix)
// fail if the contact doesn't have a phone URN or whatsap URN
telURNs := contact.URNs().WithScheme(urns.Phone.Prefix, urns.WhatsApp.Prefix)
if len(telURNs) == 0 {
return nil, errors.New("can't transfer airtime to contact without a phone number")
}
Expand Down

0 comments on commit c2241db

Please sign in to comment.