Add enable_block_emoji_reaction_settings setting
This commit is contained in:
parent
a1cfab66cf
commit
bf0d6fd2f5
7 changed files with 21 additions and 11 deletions
|
@ -336,6 +336,7 @@ class Account < ApplicationRecord
|
|||
end
|
||||
|
||||
def emoji_reactions_must_following?
|
||||
return false unless Setting.enable_block_emoji_reaction_settings
|
||||
return user&.settings&.[]('emoji_reactions.must_be_following') || false if user.present?
|
||||
return settings['emoji_reactions_must_be_following'] || false if settings.present?
|
||||
|
||||
|
@ -343,6 +344,7 @@ class Account < ApplicationRecord
|
|||
end
|
||||
|
||||
def emoji_reactions_must_follower?
|
||||
return false unless Setting.enable_block_emoji_reaction_settings
|
||||
return user&.settings&.[]('emoji_reactions.must_be_follower') || false if user.present?
|
||||
return settings['emoji_reaction_must_be_follower'] || false if settings.present?
|
||||
|
||||
|
@ -350,6 +352,7 @@ class Account < ApplicationRecord
|
|||
end
|
||||
|
||||
def emoji_reactions_deny_from_all?
|
||||
return false unless Setting.enable_block_emoji_reaction_settings
|
||||
return user&.settings&.[]('emoji_reactions.deny_from_all') || false if user.present?
|
||||
return settings['emoji_reaction_deny_from_all'] || false if settings.present?
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ class Form::AdminSettings
|
|||
status_page_url
|
||||
captcha_enabled
|
||||
ng_words
|
||||
enable_block_emoji_reaction_settings
|
||||
).freeze
|
||||
|
||||
INTEGER_KEYS = %i(
|
||||
|
@ -55,6 +56,7 @@ class Form::AdminSettings
|
|||
noindex
|
||||
require_invite_text
|
||||
captcha_enabled
|
||||
enable_block_emoji_reaction_settings
|
||||
).freeze
|
||||
|
||||
UPLOAD_KEYS = %i(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue