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

Add support to receive button text from Twilio WhatsApp #405

Merged
merged 1 commit into from
Jan 19, 2022

Conversation

norkans7
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Jan 19, 2022

Codecov Report

Merging #405 (54ca176) into main (fd95b68) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #405      +/-   ##
==========================================
+ Coverage   71.99%   72.00%   +0.01%     
==========================================
  Files          95       95              
  Lines        8294     8297       +3     
==========================================
+ Hits         5971     5974       +3     
  Misses       1731     1731              
  Partials      592      592              
Impacted Files Coverage Δ
handlers/twiml/twiml.go 85.79% <100.00%> (+0.25%) ⬆️

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 fd95b68...54ca176. Read the comment docs.

waReceivePrefixlessURN = "ToCountry=US&ToState=CA&SmsMessageSid=SM681a1f26d9ec591431ce406e8f399525&NumMedia=0&ToCity=&FromZip=60625&SmsSid=SM681a1f26d9ec591431ce406e8f399525&FromState=IL&SmsStatus=received&FromCity=CHICAGO&Body=Msg&FromCountry=US&To=%2B12028831111&ToZip=&NumSegments=1&MessageSid=SM681a1f26d9ec591431ce406e8f399525&AccountSid=acctid&From=%2B14133881111&ApiVersion=2010-04-01"
)

var testCases = []ChannelHandleTestCase{
{Label: "Receive Valid", URL: receiveURL, Data: receiveValid, Status: 200, Response: "<Response/>",
Text: Sp("Msg"), URN: Sp("tel:+14133881111"), ExternalID: Sp("SMe287d7109a5a925f182f0e07fe5b223b"),
PrepRequest: addValidSignature},
{Label: "Receive Button Valid", URL: receiveURL, Data: receiveButtonIgnored, Status: 200, Response: "<Response/>",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here the channel is not whatsapp so we should ignore the ButtonText and use the Body

@norkans7 norkans7 force-pushed the TWA-buttons-receive branch from edc523a to 54ca176 Compare January 19, 2022 10:43
@rowanseymour rowanseymour merged commit 67b27dc into main Jan 19, 2022
@rowanseymour rowanseymour deleted the TWA-buttons-receive branch January 19, 2022 14:53
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