-
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 #874: Enable using BoltJS without passing a botId #1087
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1087 +/- ##
==========================================
- Coverage 71.01% 70.96% -0.05%
==========================================
Files 13 13
Lines 1235 1233 -2
Branches 362 361 -1
==========================================
- Hits 877 875 -2
Misses 288 288
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.
Looks good to me. Perhaps, you've already verified that App
initialized with a user token now works fine but if not, we can manually check the pattern before merging this PR. If we can add some tests for the pattern, that's a great addition! but it's not a must this time.
@@ -291,37 +291,6 @@ describe('directMention()', () => { | |||
}); | |||
|
|||
describe('ignoreSelf()', () => { | |||
it('should handle context missing error', async () => { |
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.
Yes, we can safely remove this one. Also, as the other tests cover all the patterns in this test group, we don't need to add any tests this time.
This one is ready for merge but let's hold off merging until we merge #1024 |
@seratch Good call. When pulling in the latest changes, I revisited and added a test case for the pattern of only passing in a |
@misscoded Thanks, the test also looks good to me 👍 |
Summary
Fixes #874
Currently, when using an app that only makes use of a user token, the
ignoreSelf
middleware will throw an error because it expects abotId
to always be present.This PR removes the error thrown (and corresponding test) if a
botId
is not present in the incoming event's payload.Requirements (place an
x
in each[ ]
)