Skip to content

Custom Filters: Wiki and code are in conflict #1595

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

Closed
ema-pe opened this issue Nov 1, 2019 · 8 comments
Closed

Custom Filters: Wiki and code are in conflict #1595

ema-pe opened this issue Nov 1, 2019 · 8 comments
Labels
⚙️ documentation affected functionality: documentation

Comments

@ema-pe
Copy link

ema-pe commented Nov 1, 2019

About custom filters, the Wiki says that the filter method accepts a Message instance, but in the source code it accepts only an Update instance.

What is right? Should the Wiki be updated (and can I update the accused page)?

@jh0ker
Copy link
Member

jh0ker commented Nov 1, 2019

You are correct, good catch!
The wiki is wrong, this has been changed in #1221
Feel free to update the wiki page 🙂

@ema-pe
Copy link
Author

ema-pe commented Nov 1, 2019

@jh0ker it is not easy, because in the source code filter can accepts also a Message. Why there are two equivalent options?

Copy link
Member

Eldinnie commented Nov 1, 2019

@ema-pe Well. It's not wrong are it is...
Because we long as you don't set the class attribute update on your custom, only accepting a message is fine

@ema-pe
Copy link
Author

ema-pe commented Nov 1, 2019

@ema-pe Well. It's not wrong are it is...
Because we long as you don't set the class attribute update on your custom, only accepting a message is fine

You're right, I did not see the class attribute. But filter's method documentation should be updated.

Copy link
Member

Eldinnie commented Nov 1, 2019

@ema-pe I agree on that. Would you be comfortable creating a PR to fix it?

@ema-pe
Copy link
Author

ema-pe commented Nov 1, 2019

@ema-pe I agree on that. Would you be comfortable creating a PR to fix it?

Yes, I'm creating a PR

@ema-pe
Copy link
Author

ema-pe commented Nov 1, 2019

Here is the PR: #1596

@Poolitzer Poolitzer added the ⚙️ documentation affected functionality: documentation label Nov 4, 2019
@Bibo-Joshi
Copy link
Member

#2032 clarifies this. As it's already merged into the v13 branch, I'll go ahead and close this issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
⚙️ documentation affected functionality: documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants