-
Notifications
You must be signed in to change notification settings - Fork 6k
Add new MENTION filter [feature] #3857
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
Add new MENTION filter [feature] #3857
Conversation
|
Some test failed is it okay, or should I fix tests |
|
@Bibo-Joshi I have added unit test, and fixed docs build. But others test failing, that I not changed or effect, is it okay, or am I wrong any thing. |
harshil21
left a comment
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.
thanks for the pr.
test_official failing isn't your fault. However there is one line which isn't tested and that's why codecov is failing.
I'll review more later.
Bibo-Joshi
left a comment
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.
Thanks for the PR! I left a number of comments
Bibo-Joshi
left a comment
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.
Thanks for the updates! I left another batch of comments. I didn't have a look at the tests yet …
|
@Bibo-Joshi Thanks your feedbacks, I will fix it |
Bibo-Joshi
left a comment
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.
Thanks for the updates. I left another batch of comments. Didn't look at the tests yet …
| if isinstance(mention, TGUser): | ||
| return bool(any(mention.id == e.user.id for e in message.entities if e.user)) |
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.
one should also check if mention.username is in one of the MessageEntities of type MessageEntity.MENTION
| if isinstance(mention, int): | ||
| return bool(any(mention == e.user.id for e in message.entities if e.user)) | ||
| return bool( | ||
| isinstance(mention, str) |
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.
Is there a specifi reason for this type check? Seems superfluous to me …
|
Due to inactivity, closing in favor of #3941 |
closes #3799