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

Fix rate limit issue on raw reaction add/remove events. #3306

Merged
merged 3 commits into from
Nov 19, 2023

Conversation

Jerrie-Aries
Copy link
Contributor

The rate limit on reaction events issue has been reported multiple times in support server. The latest one (as of this PR is created) can be found here.
Currently the bot attempts to fetch the message using API call on every reaction made including in other than thread channels. It is quite unnecessary since we only need the message object to do thread stuff (mostly linking messages). More explanation of the issue can be found in support server's help channel here.

This PR fixes the issue by making sure the thread exists before using API call to fetch the message.

Copy link
Collaborator

@Taaku18 Taaku18 left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks for the PR.

@Taaku18 Taaku18 added staged Staged for next version and removed pending review labels Nov 19, 2023
@Taaku18 Taaku18 merged commit ae99060 into modmail-dev:development Nov 19, 2023
2 checks passed
@Jerrie-Aries Jerrie-Aries deleted the dev/reaction-rate-limit branch November 19, 2023 10:21
@Taaku18 Taaku18 mentioned this pull request Nov 20, 2023
raidensakura pushed a commit to raidensakura/modmail that referenced this pull request Apr 10, 2024
…3306)

* Fix rate limit issue on raw reaction add/remove events.

* Pasd message object to `find_linked_messages` since it is already fetched.

---------

Co-authored-by: Taku <[email protected]>
khakers pushed a commit to khakers/OpenModmail that referenced this pull request Jun 18, 2024
…3306)

* Fix rate limit issue on raw reaction add/remove events.

* Pasd message object to `find_linked_messages` since it is already fetched.

---------

Co-authored-by: Taku <[email protected]>
(cherry picked from commit ae99060)
Signed-off-by: Khakers <[email protected]>
khakers pushed a commit to khakers/OpenModmail that referenced this pull request Jun 18, 2024
…3306)

* Fix rate limit issue on raw reaction add/remove events.

* Pasd message object to `find_linked_messages` since it is already fetched.

---------

Co-authored-by: Taku <[email protected]>
(cherry picked from commit ae99060)
Signed-off-by: Khakers <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
staged Staged for next version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants