[FIX] Modernize rate limiting of sendMessage#7325
Merged
rodrigok merged 1 commit intoRocketChat:developfrom Jul 14, 2017
Merged
[FIX] Modernize rate limiting of sendMessage#7325rodrigok merged 1 commit intoRocketChat:developfrom
rodrigok merged 1 commit intoRocketChat:developfrom
Conversation
c6387f0 to
0b5ad28
Compare
geekgonecrazy
previously requested changes
Jun 26, 2017
Contributor
geekgonecrazy
left a comment
There was a problem hiding this comment.
First off thanks for contributing! Second, i'd like to suggest doing based on permission instead of on role.
Contributor
Author
|
@geekgonecrazy Thanks for your review, also of #7326. This was already based on role before, I merely fixed the port to CoffeeScript -> ECMAScript and to Rocket.Chat's own RateLimit adapter. However, I can of course port this to a permission model. Do I understand correctly that you would like to introduce a new permission, e.g. "sendMessage-rate-limit-exemption"? |
- use permissions instead of roles (new permission is introduced) - port to RateLimiter facade The latter is necessary to keep tests passing.
0b5ad28 to
eafba82
Compare
rodrigok
approved these changes
Jul 14, 2017
Member
|
Thanks @jangmarker |
rodrigok
added a commit
that referenced
this pull request
Aug 8, 2017
[FIX] Modernize rate limiting of sendMessage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@RocketChat/core
In the old coffee script code line 97 was
return 'bot' not in user.roles, but it was converted to JavaScript touser.roles.includes('bot').