Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable to send airtime to WhatsApp URNs #1282

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading