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

Support sending for WhatsApp URNs #1267

Merged
merged 1 commit into from
Jun 11, 2024
Merged

Support sending for WhatsApp URNs #1267

merged 1 commit into from
Jun 11, 2024

Conversation

norkans7
Copy link
Contributor

No description provided.

@norkans7 norkans7 mentioned this pull request Jun 11, 2024
@norkans7 norkans7 requested a review from rowanseymour June 11, 2024 19:59
Copy link

codecov bot commented Jun 11, 2024

Codecov Report

Attention: Patch coverage is 85.71429% with 2 lines in your changes missing coverage. Please review.

Project coverage is 81.88%. Comparing base (8ef199a) to head (a96fe24).

Files Patch % Lines
services/airtime/dtone/service.go 66.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1267      +/-   ##
==========================================
- Coverage   81.89%   81.88%   -0.01%     
==========================================
  Files         276      276              
  Lines       17439    17443       +4     
==========================================
+ Hits        14282    14284       +2     
- Misses       2587     2588       +1     
- Partials      570      571       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -34,8 +35,10 @@ func (s *service) Transfer(sender urns.URN, recipient urns.URN, amounts map[stri
DesiredAmount: decimal.Zero,
ActualAmount: decimal.Zero,
}
// make sure we have the phone number with the +
recipientPhoneNumber := "+" + strings.TrimPrefix(recipient.Path(), "+")
Copy link
Member

@rowanseymour rowanseymour Jun 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

go philosophy is not to be so clever.. so...

recipientPhoneNumber := recipient.Path()
if !strings.HasPrefix(recipientPhoneNumber, "+") {
    recipientPhoneNumber = "+" + recipientPhoneNumber
}

@rowanseymour rowanseymour merged commit 885ce83 into main Jun 11, 2024
7 checks passed
@rowanseymour rowanseymour deleted the WA-airtime branch June 11, 2024 22:24
@github-actions github-actions bot locked and limited conversation to collaborators Jun 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants