Skip to content
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

update for the new and left chat member filters #741

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

idokar
Copy link

@idokar idokar commented Aug 10, 2021

This update suports the new ChetMemberUpdate updare.

Filters for new and left chat member that supports the new update type
This update suports the new ChetMemberUpdate updare.
The threshold parameter check if a user has joined in the last 2 seconds related to the update creation time.
The check "if is_member is False" is importent because this variabel can be None
@idokar
Copy link
Author

idokar commented Aug 12, 2021

This new functions have been checked on almost all the cases
All cases

if isinstance(m, Message):
return bool(m.new_chat_members)
if m.new_chat_member:
threshold = 2
Copy link
Author

Choose a reason for hiding this comment

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

The best threshold is 2sec or 3sec

@delivrance
Copy link
Member

I believe we need separate filters (with new names) that don't mess with the existing ones (which are dedicated to Message objects because they are about events that generate the service message, whereas ChatMemberUpdated events are silent).
Any applicable situation can have a filter (i.e. joined, left, restricted, unrestricted, kicked/banned, unbanned, ...)

@idokar
Copy link
Author

idokar commented Aug 29, 2021

I believe we need separate filters (with new names) that don't mess with the existing ones (which are dedicated to Message objects because they are about events that generate the service message, whereas ChatMemberUpdated events are silent).
Any applicable situation can have a filter (i.e. joined, left, restricted, unrestricted, kicked/banned, unbanned, ...)

Want me to upload it as a separate file with filters for ChatMemberUpdated or in the same file?
@delivrance

@idokar
Copy link
Author

idokar commented Oct 3, 2021

I believe we need separate filters (with new names) that don't mess with the existing ones (which are dedicated to Message objects because they are about events that generate the service message, whereas ChatMemberUpdated events are silent). Any applicable situation can have a filter (i.e. joined, left, restricted, unrestricted, kicked/banned, unbanned, ...)

@delivrance I would appreciate it if you could check out the new update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants