Fix being able to bypass MAX_REACTIONS
When reacting with different custom emojis with the same shortcode, it would count as an already present reaction and processed, bypassing the limit. Signed-off-by: Plastikmensch <plastikmensch@users.noreply.github.com>
This commit is contained in:
parent
1a42ad69f7
commit
0ac7b22532
|
@ -19,7 +19,7 @@ class StatusReactionValidator < ActiveModel::Validator
|
|||
end
|
||||
|
||||
def new_reaction?(reaction)
|
||||
!reaction.status.status_reactions.exists?(status: reaction.status, account: reaction.account, name: reaction.name)
|
||||
!reaction.status.status_reactions.exists?(status: reaction.status, account: reaction.account, name: reaction.name, custom_emoji: reaction.custom_emoji)
|
||||
end
|
||||
|
||||
def limit_reached?(reaction)
|
||||
|
|
Reference in New Issue