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

Fix #971 AwsLambdaReceiver fails to parse event.body if isBase64Encoded is true #972

Merged
merged 4 commits into from
Jun 29, 2021

Conversation

TheManWhoStaresAtCode
Copy link
Contributor

@TheManWhoStaresAtCode TheManWhoStaresAtCode commented Jun 22, 2021

Summary

Fix bug when the event body is base64 encoded #971

Fixes #971

Requirements (place an x in each [ ])

@gitwave gitwave bot added the untriaged label Jun 22, 2021
@codecov
Copy link

codecov bot commented Jun 22, 2021

Codecov Report

Merging #972 (123fc77) into main (7698953) will increase coverage by 0.05%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #972      +/-   ##
==========================================
+ Coverage   66.19%   66.25%   +0.05%     
==========================================
  Files          13       13              
  Lines        1207     1212       +5     
  Branches      356      357       +1     
==========================================
+ Hits          799      803       +4     
- Misses        338      339       +1     
  Partials       70       70              
Impacted Files Coverage Δ
src/receivers/AwsLambdaReceiver.ts 60.46% <66.66%> (+1.20%) ⬆️

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 7698953...123fc77. Read the comment docs.

@stevengill stevengill added enhancement M-T: A feature request for new functionality and removed untriaged labels Jun 22, 2021
@stevengill stevengill requested review from seratch and stevengill June 22, 2021 19:47
Copy link
Member

@stevengill stevengill left a comment

Choose a reason for hiding this comment

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

Hey @TheManWhoStaresAtCode! Thanks for sending this in. Looks like a great PR. Thanks for adding a test too! I'll leave it open for a bit to give other contributors a chance to review.

if (typeof awsEvent.body === 'undefined' || awsEvent.body == null) {
return '';
}
if (awsEvent.isBase64Encoded) {
Copy link
Member

Choose a reason for hiding this comment

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

@seratch seratch changed the title Base64 decoded body 971 Fix #971 AwsLambdaReceiver fails to parse event.body if isBase64Encoded is true Jun 22, 2021
@seratch seratch added this to the 3.5.0 milestone Jun 22, 2021
@seratch seratch merged commit 6ce89ae into slackapi:main Jun 29, 2021
@stevengill stevengill modified the milestones: 3.5.0, 3.4.1 Jun 30, 2021
@TheManWhoStaresAtCode TheManWhoStaresAtCode deleted the Base64DecodedBody_971 branch November 26, 2021 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement M-T: A feature request for new functionality semver:patch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AwsLambdaReceiver fails to parse event.body if isBase64Encoded is true
3 participants