Skip to content

Add methods to register filters and middlewares #370

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

Merged
merged 2 commits into from
Jun 29, 2020
Merged

Add methods to register filters and middlewares #370

merged 2 commits into from
Jun 29, 2020

Conversation

Abstract-X
Copy link

@Abstract-X Abstract-X commented Jun 26, 2020

Description

PR adds public registration methods for filters and middlewares so that in addition to these methods:

dispatcher.filters_factory.bind(SomeFilter)
dispatcher.filters_factory.unbind(SomeFilter)
dispatcher.middleware.setup(SomeMiddleware())

...there were these:

dispatcher.bind_filter(SomeFilter)
dispatcher.unbind_filter(SomeFilter)
dispatcher.setup_middleware(SomeMiddleware())

Type of change

  • Documentation (typos, code examples or any documentation update)
  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes

@JrooTJunior JrooTJunior added the enhancement Make it better! label Jun 27, 2020
@JrooTJunior JrooTJunior merged commit 3d39652 into aiogram:dev-2.x Jun 29, 2020
@Abstract-X Abstract-X deleted the add-dp-setup-methods branch June 29, 2020 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Make it better!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants