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

Cloud API WA #430

Merged
merged 6 commits into from
May 26, 2022
Merged

Cloud API WA #430

merged 6 commits into from
May 26, 2022

Conversation

norkans7
Copy link
Contributor

@norkans7 norkans7 commented Apr 8, 2022

contains #429

@norkans7 norkans7 mentioned this pull request Apr 8, 2022
@codecov
Copy link

codecov bot commented Apr 8, 2022

Codecov Report

Merging #430 (aab4afa) into main (2d19d67) will increase coverage by 0.75%.
The diff coverage is 80.64%.

@@            Coverage Diff             @@
##             main     #430      +/-   ##
==========================================
+ Coverage   71.90%   72.66%   +0.75%     
==========================================
  Files          95       95              
  Lines        8387    12661    +4274     
==========================================
+ Hits         6031     9200    +3169     
- Misses       1757     2832    +1075     
- Partials      599      629      +30     
Impacted Files Coverage Δ
test.go 30.74% <0.00%> (-1.35%) ⬇️
handlers/facebookapp/facebookapp.go 82.01% <80.63%> (+0.13%) ⬆️
config.go 70.58% <100.00%> (-1.83%) ⬇️
utils/http.go 22.93% <0.00%> (-2.71%) ⬇️
handlers/arabiacell/arabiacell.go 77.27% <0.00%> (-2.32%) ⬇️
handlers/i2sms/i2sms.go 78.04% <0.00%> (-2.28%) ⬇️
channel.go 25.00% <0.00%> (-2.28%) ⬇️
handlers/mtarget/mtarget.go 75.80% <0.00%> (-1.98%) ⬇️
handlers/m3tech/m3tech.go 83.33% <0.00%> (-1.86%) ⬇️
... and 88 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2d19d67...aab4afa. Read the comment docs.

func newHandler(channelType courier.ChannelType, name string, useUUIDRoutes bool) courier.ChannelHandler {
return &handler{handlers.NewBaseHandlerWithParams(channelType, name, useUUIDRoutes)}
}

func init() {
courier.RegisterHandler(newHandler("IG", "Instagram", false))
courier.RegisterHandler(newHandler("FBA", "Facebook", false))
courier.RegisterHandler(newHandler("CWA", "Cloud API WhatsApp", false))
Copy link
Member

Choose a reason for hiding this comment

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

how about we call this WAC / WhatsApp Cloud in code so that lexically this channel type will appear with the existing WA.. and if I'm looking for a WhatsApp channel type, I'm probably going to start looking under W


channelAddress = payload.Entry[0].Changes[0].Value.Metadata.DisplayPhoneNumber
if channelAddress == "" {
return nil, fmt.Errorf("no channel adress found")
Copy link
Member

Choose a reason for hiding this comment

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

address

@norkans7 norkans7 requested a review from rowanseymour May 17, 2022 18:35
AWSSecretAccessKey: "",
FacebookApplicationSecret: "missing_facebook_app_secret",
FacebookWebhookSecret: "missing_facebook_webhook_secret",
WhatsappAdminSystemUserToken: "missing_whatsapp_admin_system_user_token",
Copy link
Member

Choose a reason for hiding this comment

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

can this be a little more succinct? WhatsappAdminToken? WhatsappSystemUserToken?

Copy link
Contributor Author

@norkans7 norkans7 May 25, 2022

Choose a reason for hiding this comment

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

There are 2 types of system users so I thought that is more precise

@rowanseymour rowanseymour merged commit 4cec783 into main May 26, 2022
@rowanseymour rowanseymour deleted the cloud--api-wa branch May 26, 2022 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants