-
Notifications
You must be signed in to change notification settings - Fork 399
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
Fix #971 AwsLambdaReceiver fails to parse event.body if isBase64Encoded is true #972
Conversation
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
There was a problem hiding this 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) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is the way that Bolt for Python does the same: https://github.com/slackapi/bolt-python/blob/v1.6.1/slack_bolt/adapter/aws_lambda/handler.py#L84-L85
LGTM
Summary
Fix bug when the event body is base64 encoded #971
Fixes #971
Requirements (place an
x
in each[ ]
)