change default reaction limit to 1

This commit is contained in:
anna 2022-11-30 12:01:34 +00:00
parent 38b8c494b8
commit c19e74051c
Signed by: fef
GPG key ID: EC22E476DC2D3D84

View file

@ -3,7 +3,7 @@
class StatusReactionValidator < ActiveModel::Validator
SUPPORTED_EMOJIS = Oj.load_file(Rails.root.join('app', 'javascript', 'mastodon', 'features', 'emoji', 'emoji_map.json').to_s).keys.freeze
LIMIT = [1, (ENV['MAX_REACTIONS'] || 8).to_i].max
LIMIT = [1, (ENV['MAX_REACTIONS'] || 1).to_i].max
def validate(reaction)
return if reaction.name.blank?