Sitelet https://web.archive.org/web/20201210054152/https://github.com/pyrogram/pyrogram/issues/548
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 handling in accounts with many chats #548

Open
CrisMystik opened this issue Nov 24, 2020 · 2 comments
Open

update handling in accounts with many chats #548

CrisMystik opened this issue Nov 24, 2020 · 2 comments

Comments

@CrisMystik
Copy link
Contributor

@CrisMystik CrisMystik commented Nov 24, 2020

Checklist

  • I am sure the error is coming from Pyrogram's code and not elsewhere.
  • I have searched in the issue tracker for similar bug reports, including closed ones.
  • I ran pip3 install -U https://github.com/pyrogram/pyrogram/archive/master.zip and reproduced the issue using the latest development version.

Description

Currently Pyrogram, for each update received, calls different methods to provide some additional information. However, in accounts with many active chats, and therefore many messages received, it is easy for this to lead to floodwait of these methods, particularly GetMessages.

Proposed solution

A get_additional_info parameter in the Client object, which is True by default, and if set to False disables obtaining additional information by calling methods when receiving updates

@delivrance
Copy link
Member

@delivrance delivrance commented Nov 28, 2020

Related to #264 and #265.

@CrisMystik
Copy link
Contributor Author

@CrisMystik CrisMystik commented Dec 9, 2020

Related to #264 and #265.

but this would not solve the problem completely, bots using pyrogram would still be at risk of ceasing to function for some time in the event of GetMessages floodwait in particular, and would be vulnerable to attacks that take advantage of this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.