diff --git a/app/models/account.rb b/app/models/account.rb index 28c024877a..62b4f9b6e5 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -364,7 +364,6 @@ class Account < ApplicationRecord end 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 :allow if user.nil? @@ -381,12 +380,8 @@ class Account < ApplicationRecord 'hide_followers_count' => hide_followers_count?, 'translatable_private' => translatable_private?, '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 end diff --git a/app/models/form/admin_settings.rb b/app/models/form/admin_settings.rb index a5e3b556bd..c133f17124 100644 --- a/app/models/form/admin_settings.rb +++ b/app/models/form/admin_settings.rb @@ -37,7 +37,6 @@ class Form::AdminSettings status_page_url captcha_enabled ng_words - enable_block_emoji_reaction_settings hide_local_users_for_anonymous post_hash_tags_max sensitive_words @@ -64,7 +63,6 @@ class Form::AdminSettings noindex require_invite_text captcha_enabled - enable_block_emoji_reaction_settings hide_local_users_for_anonymous authorized_fetch ).freeze diff --git a/app/validators/emoji_reaction_validator.rb b/app/validators/emoji_reaction_validator.rb index 16461a3d7e..ec61434489 100644 --- a/app/validators/emoji_reaction_validator.rb +++ b/app/validators/emoji_reaction_validator.rb @@ -22,7 +22,6 @@ class EmojiReactionValidator < ActiveModel::Validator end 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 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 diff --git a/app/views/admin/ng_words/show.html.haml b/app/views/admin/ng_words/show.html.haml index d76757e4c0..9fad862787 100644 --- a/app/views/admin/ng_words/show.html.haml +++ b/app/views/admin/ng_words/show.html.haml @@ -13,9 +13,6 @@ .fields-group = 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 = f.input :hide_local_users_for_anonymous, wrapper: :with_label, as: :boolean, label: t('admin.ng_words.hide_local_users_for_anonymous') diff --git a/app/views/settings/preferences/other/show.html.haml b/app/views/settings/preferences/other/show.html.haml index 4d3a11c6f4..cce46ecbe9 100644 --- a/app/views/settings/preferences/other/show.html.haml +++ b/app/views/settings/preferences/other/show.html.haml @@ -20,8 +20,9 @@ .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') - - if Setting.enable_block_emoji_reaction_settings - = 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-row + .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 diff --git a/config/locales/en.yml b/config/locales/en.yml index 06d3c6ccb1..42df586ddc 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -597,7 +597,6 @@ en: media_attachments: title: Media attachments 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 keywords: Reject keywords keywords_hint: The first character of the line is "?". to use regular expressions diff --git a/config/locales/ja.yml b/config/locales/ja.yml index edef41a462..cffaf229a3 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -595,7 +595,6 @@ ja: media_attachments: title: 投稿された画像 ng_words: - enable_block_emoji_reaction_settings: 各ユーザーにスタンプ機能のブロック設定項目を解放する hide_local_users_for_anonymous: ログインしていない状態でローカルユーザーの投稿をタイムラインから取得できないようにする keywords: 投稿できないキーワード keywords_hint: 行を「?」で始めると、正規表現が使えます