From 54580fb33d94228e57e3dd8285dbc0c3ee82ba27 Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 13 Sep 2023 12:23:01 +0200 Subject: [PATCH] Automatically dismiss the privacy settings notice when visiting the privacy settings page --- app/controllers/settings/privacy_controller.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/controllers/settings/privacy_controller.rb b/app/controllers/settings/privacy_controller.rb index 1102c89fad..ec6a3e9547 100644 --- a/app/controllers/settings/privacy_controller.rb +++ b/app/controllers/settings/privacy_controller.rb @@ -3,9 +3,13 @@ class Settings::PrivacyController < Settings::BaseController before_action :set_account - def show; end + def show + Notice.find(:mastodon_privacy_4_2).dismiss_for_user!(@account.user) # rubocop:disable Naming/VariableNumber + end def update + Notice.find(:mastodon_privacy_4_2).dismiss_for_user!(@account.user) # rubocop:disable Naming/VariableNumber + if UpdateAccountService.new.call(@account, account_params.except(:settings)) current_user.update!(settings_attributes: account_params[:settings]) ActivityPub::UpdateDistributionWorker.perform_async(@account.id)