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

Example on how to use IPeerCollector #265

Closed
mehtadone opened this issue Jun 26, 2024 · 3 comments
Closed

Example on how to use IPeerCollector #265

mehtadone opened this issue Jun 26, 2024 · 3 comments
Labels
question General question or discussion

Comments

@mehtadone
Copy link

Hi,

Can anyone provide an example of how to use UpdateManager with IPeerCollector? I was under the assumption you could use this to listen to updates from certain chats/users only but if I create one and add chats/users, I still receive messages from all chats.

Thank you in advance

@RafayGhafoor
Copy link

@mehtadone, You can see example here where you can handle the case of new message arrived and handle by specific user id or chat.

@mehtadone
Copy link
Author

@mehtadone, You can see example here where you can handle the case of new message arrived and handle by specific user id or chat.

Thank you! This is what I am doing now, but was more wondering if you didn't have to handle every message. I thought that is was IPeerCollector does

@wiz0u
Copy link
Owner

wiz0u commented Jul 9, 2024

IPeerCollector is not a filtering system, it's a collector system.
The HasUser/HasChat are used to determine if a user/chat was already collected.

@wiz0u wiz0u closed this as completed Jul 9, 2024
@wiz0u wiz0u added the question General question or discussion label Jul 27, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question General question or discussion
Projects
None yet
Development

No branches or pull requests

3 participants