Remove enable_block_emoji_reaction_settings
This commit is contained in:
parent
673e607e94
commit
18a0908878
7 changed files with 4 additions and 16 deletions
|
@ -364,7 +364,6 @@ class Account < ApplicationRecord
|
||||||
end
|
end
|
||||||
|
|
||||||
def emoji_reaction_policy
|
def emoji_reaction_policy
|
||||||
return :allow unless Setting.enable_block_emoji_reaction_settings || !local?
|
|
||||||
return settings['emoji_reaction_policy']&.to_sym || :allow if settings.present?
|
return settings['emoji_reaction_policy']&.to_sym || :allow if settings.present?
|
||||||
return :allow if user.nil?
|
return :allow if user.nil?
|
||||||
|
|
||||||
|
@ -381,12 +380,8 @@ class Account < ApplicationRecord
|
||||||
'hide_followers_count' => hide_followers_count?,
|
'hide_followers_count' => hide_followers_count?,
|
||||||
'translatable_private' => translatable_private?,
|
'translatable_private' => translatable_private?,
|
||||||
'link_preview' => link_preview?,
|
'link_preview' => link_preview?,
|
||||||
|
'emoji_reaction_policy' => user&.setting_emoji_reaction_policy,
|
||||||
}
|
}
|
||||||
if Setting.enable_block_emoji_reaction_settings
|
|
||||||
config = config.merge({
|
|
||||||
'emoji_reaction_policy' => user&.setting_emoji_reaction_policy,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
config = config.merge(settings) if settings.present?
|
config = config.merge(settings) if settings.present?
|
||||||
config
|
config
|
||||||
end
|
end
|
||||||
|
|
|
@ -37,7 +37,6 @@ class Form::AdminSettings
|
||||||
status_page_url
|
status_page_url
|
||||||
captcha_enabled
|
captcha_enabled
|
||||||
ng_words
|
ng_words
|
||||||
enable_block_emoji_reaction_settings
|
|
||||||
hide_local_users_for_anonymous
|
hide_local_users_for_anonymous
|
||||||
post_hash_tags_max
|
post_hash_tags_max
|
||||||
sensitive_words
|
sensitive_words
|
||||||
|
@ -64,7 +63,6 @@ class Form::AdminSettings
|
||||||
noindex
|
noindex
|
||||||
require_invite_text
|
require_invite_text
|
||||||
captcha_enabled
|
captcha_enabled
|
||||||
enable_block_emoji_reaction_settings
|
|
||||||
hide_local_users_for_anonymous
|
hide_local_users_for_anonymous
|
||||||
authorized_fetch
|
authorized_fetch
|
||||||
).freeze
|
).freeze
|
||||||
|
|
|
@ -22,7 +22,6 @@ class EmojiReactionValidator < ActiveModel::Validator
|
||||||
end
|
end
|
||||||
|
|
||||||
def deny_emoji_reactions?(emoji_reaction)
|
def deny_emoji_reactions?(emoji_reaction)
|
||||||
return false unless Setting.enable_block_emoji_reaction_settings
|
|
||||||
return false if emoji_reaction.status.account.user.nil?
|
return false if emoji_reaction.status.account.user.nil?
|
||||||
return deny_from_all?(emoji_reaction) if emoji_reaction.status.account_id == emoji_reaction.account_id
|
return deny_from_all?(emoji_reaction) if emoji_reaction.status.account_id == emoji_reaction.account_id
|
||||||
return false if emoji_reaction.status.account.emoji_reaction_policy == :allow
|
return false if emoji_reaction.status.account.emoji_reaction_policy == :allow
|
||||||
|
|
|
@ -13,9 +13,6 @@
|
||||||
.fields-group
|
.fields-group
|
||||||
= f.input :post_hash_tags_max, wrapper: :with_label, as: :integer, label: t('admin.ng_words.post_hash_tags_max')
|
= f.input :post_hash_tags_max, wrapper: :with_label, as: :integer, label: t('admin.ng_words.post_hash_tags_max')
|
||||||
|
|
||||||
.fields-group
|
|
||||||
= f.input :enable_block_emoji_reaction_settings, wrapper: :with_label, as: :boolean, label: t('admin.ng_words.enable_block_emoji_reaction_settings')
|
|
||||||
|
|
||||||
.fields-group
|
.fields-group
|
||||||
= f.input :hide_local_users_for_anonymous, wrapper: :with_label, as: :boolean, label: t('admin.ng_words.hide_local_users_for_anonymous')
|
= f.input :hide_local_users_for_anonymous, wrapper: :with_label, as: :boolean, label: t('admin.ng_words.hide_local_users_for_anonymous')
|
||||||
|
|
||||||
|
|
|
@ -20,8 +20,9 @@
|
||||||
.fields-group
|
.fields-group
|
||||||
= ff.input :default_sensitive, wrapper: :with_label, label: I18n.t('simple_form.labels.defaults.setting_default_sensitive'), hint: I18n.t('simple_form.hints.defaults.setting_default_sensitive')
|
= ff.input :default_sensitive, wrapper: :with_label, label: I18n.t('simple_form.labels.defaults.setting_default_sensitive'), hint: I18n.t('simple_form.hints.defaults.setting_default_sensitive')
|
||||||
|
|
||||||
- if Setting.enable_block_emoji_reaction_settings
|
.fields-row
|
||||||
= ff.input :emoji_reaction_policy, kmyblue: true, collection: ['allow', 'outside_only', 'followers_only', 'followees_only', 'mutuals_only', 'block', 'block_and_hide'], label_method: lambda { |item| safe_join([t("simple_form.labels.defaults.setting_emoji_reaction_policy_items.#{item}")]) }, as: :radio_buttons, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li', wrapper: :with_floating_label, label: I18n.t('simple_form.labels.defaults.setting_emoji_reaction_policy')
|
.fields-group.fields-row__column.fields-row__column-12
|
||||||
|
= ff.input :emoji_reaction_policy, kmyblue: true, collection: ['allow', 'outside_only', 'followers_only', 'followees_only', 'mutuals_only', 'block', 'block_and_hide'], label_method: lambda { |item| safe_join([t("simple_form.labels.defaults.setting_emoji_reaction_policy_items.#{item}")]) }, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li', include_blank: false, wrapper: :with_label, label: I18n.t('simple_form.labels.defaults.setting_emoji_reaction_policy')
|
||||||
|
|
||||||
- if @dtl_enabled
|
- if @dtl_enabled
|
||||||
|
|
||||||
|
|
|
@ -597,7 +597,6 @@ en:
|
||||||
media_attachments:
|
media_attachments:
|
||||||
title: Media attachments
|
title: Media attachments
|
||||||
ng_words:
|
ng_words:
|
||||||
enable_block_emoji_reaction_settings: Enable block emoji reactions settings for users
|
|
||||||
hide_local_users_for_anonymous: Hide timeline local user posts from anonymous
|
hide_local_users_for_anonymous: Hide timeline local user posts from anonymous
|
||||||
keywords: Reject keywords
|
keywords: Reject keywords
|
||||||
keywords_hint: The first character of the line is "?". to use regular expressions
|
keywords_hint: The first character of the line is "?". to use regular expressions
|
||||||
|
|
|
@ -595,7 +595,6 @@ ja:
|
||||||
media_attachments:
|
media_attachments:
|
||||||
title: 投稿された画像
|
title: 投稿された画像
|
||||||
ng_words:
|
ng_words:
|
||||||
enable_block_emoji_reaction_settings: 各ユーザーにスタンプ機能のブロック設定項目を解放する
|
|
||||||
hide_local_users_for_anonymous: ログインしていない状態でローカルユーザーの投稿をタイムラインから取得できないようにする
|
hide_local_users_for_anonymous: ログインしていない状態でローカルユーザーの投稿をタイムラインから取得できないようにする
|
||||||
keywords: 投稿できないキーワード
|
keywords: 投稿できないキーワード
|
||||||
keywords_hint: 行を「?」で始めると、正規表現が使えます
|
keywords_hint: 行を「?」で始めると、正規表現が使えます
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue