From e5df772adbe8839fde09233d86b71fe60222e5cb Mon Sep 17 00:00:00 2001 From: KMY Date: Fri, 1 Sep 2023 17:44:48 +0900 Subject: [PATCH] Remove unusing settings from other_settings --- app/models/account.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/models/account.rb b/app/models/account.rb index f3655c70d1..c9a36eb4b7 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -388,11 +388,15 @@ class Account < ApplicationRecord 'hide_statuses_count' => hide_statuses_count?, 'hide_following_count' => hide_following_count?, 'hide_followers_count' => hide_followers_count?, - 'emoji_reaction_must_following' => emoji_reactions_must_following?, - 'emoji_reaction_must_follower' => emoji_reactions_must_follower?, - 'emoji_reaction_deny_from_all' => emoji_reactions_deny_from_all?, 'translatable_private' => translatable_private?, } + if Setting.enable_block_emoji_reaction_settings + config = config.merge({ + 'emoji_reaction_must_following' => emoji_reactions_must_following?, + 'emoji_reaction_must_follower' => emoji_reactions_must_follower?, + 'emoji_reaction_deny_from_all' => emoji_reactions_deny_from_all?, + }) + end config = config.merge(settings) if settings.present? config end