Skip to content

Fix #307 Add options to disable the built-in middleware - #310

Merged
seratch merged 4 commits into
slackapi:mainfrom
seratch:issue-307-disabling-builtin-middleware
Apr 29, 2021
Merged

seratch merged 4 commits into
slackapi:mainfrom
seratch:issue-307-disabling-builtin-middleware

Conversation

@seratch

@seratch seratch commented Apr 28, 2021

Copy link
Copy Markdown
Contributor

This pull request fixes #307 and also adds more options to disable the built-in middleware. Refer to my comment #307 (comment) for more details.

see also:

Category (place an x in each of the [ ])

  • slack_bolt.App and/or its core components
  • slack_bolt.async_app.AsyncApp and/or its core components
  • Adapters in slack_bolt.adapter
  • Document pages under /docs
  • Others

Requirements (place an x in each [ ])

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

  • I've read and understood the Contributing Guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've run ./scripts/install_all_and_run_tests.sh after making the changes.

@seratch seratch added this to the 1.6.0 milestone Apr 28, 2021
@seratch seratch self-assigned this Apr 28, 2021
@codecov

codecov Bot commented Apr 28, 2021 •

Copy link
Copy Markdown

Codecov Report

Merging #310 (3d67252) into main (ad622e4) will increase coverage by 0.10%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #310      +/-   ##
==========================================
+ Coverage   91.45%   91.56%   +0.10%     
==========================================
  Files         166      166              
  Lines        5278     5286       +8     
==========================================
+ Hits         4827     4840      +13     
+ Misses        451      446       -5     
Impacted Files Coverage Δ
slack_bolt/app/app.py 87.61% <100.00%> (+0.11%) ⬆️
slack_bolt/app/async_app.py 94.01% <100.00%> (+0.06%) ⬆️
...e/authorization/async_single_team_authorization.py 93.54% <0.00%> (+3.22%) ⬆️
...dleware/authorization/single_team_authorization.py 93.33% <0.00%> (+3.33%) ⬆️
...dleware/url_verification/async_url_verification.py 100.00% <0.00%> (+7.69%) ⬆️
...lt/middleware/url_verification/url_verification.py 100.00% <0.00%> (+11.11%) ⬆️

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 ad622e4...3d67252. Read the comment docs.

response = app.dispatch(request)
assert response.status == 200

def test_self_events(self):

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I moved this to test_events_ignore_self.py

say("What's up?")

# request including invalid headers
expired = int(time()) - 3600

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

if the request verification is enabled, this request is rejected.

@stevengill stevengill left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Solid change!

@seratch

seratch commented Apr 29, 2021

Copy link
Copy Markdown
Contributor Author

Thanks for reviewing this PR!

@seratch
seratch merged commit 76158a8 into slackapi:main Apr 29, 2021
@seratch
seratch deleted the issue-307-disabling-builtin-middleware branch April 29, 2021 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Event listener not catching bot reply messages

2 participants