about summary refs log tree commit diff
path: root/app/controllers/settings
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/settings')
-rw-r--r--app/controllers/settings/preferences/filters_controller.rb9
-rw-r--r--app/controllers/settings/preferences/privacy_controller.rb9
-rw-r--r--app/controllers/settings/preferences/publishing_controller.rb9
-rw-r--r--app/controllers/settings/preferences_controller.rb17
-rw-r--r--app/controllers/settings/profiles_controller.rb4
5 files changed, 47 insertions, 1 deletions
diff --git a/app/controllers/settings/preferences/filters_controller.rb b/app/controllers/settings/preferences/filters_controller.rb
new file mode 100644
index 000000000..c58a698ef
--- /dev/null
+++ b/app/controllers/settings/preferences/filters_controller.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+class Settings::Preferences::FiltersController < Settings::PreferencesController
+  private
+
+  def after_update_redirect_path
+    settings_preferences_filters_path
+  end
+end
diff --git a/app/controllers/settings/preferences/privacy_controller.rb b/app/controllers/settings/preferences/privacy_controller.rb
new file mode 100644
index 000000000..f447fa598
--- /dev/null
+++ b/app/controllers/settings/preferences/privacy_controller.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+class Settings::Preferences::PrivacyController < Settings::PreferencesController
+  private
+
+  def after_update_redirect_path
+    settings_preferences_privacy_path
+  end
+end
diff --git a/app/controllers/settings/preferences/publishing_controller.rb b/app/controllers/settings/preferences/publishing_controller.rb
new file mode 100644
index 000000000..5b298d94d
--- /dev/null
+++ b/app/controllers/settings/preferences/publishing_controller.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+class Settings::Preferences::PublishingController < Settings::PreferencesController
+  private
+
+  def after_update_redirect_path
+    settings_preferences_publishing_path
+  end
+end
diff --git a/app/controllers/settings/preferences_controller.rb b/app/controllers/settings/preferences_controller.rb
index 75c3e2495..bbfd82869 100644
--- a/app/controllers/settings/preferences_controller.rb
+++ b/app/controllers/settings/preferences_controller.rb
@@ -11,6 +11,7 @@ class Settings::PreferencesController < Settings::BaseController
     user_settings.update(user_settings_params.to_h)
 
     if current_user.update(user_params)
+      Rails.cache.delete("filter_settings:#{current_user.account_id}")
       I18n.locale = current_user.locale
       redirect_to after_update_redirect_path, notice: I18n.t('generic.changes_saved_msg')
     else
@@ -61,6 +62,22 @@ class Settings::PreferencesController < Settings::BaseController
       :setting_use_pending_items,
       :setting_trends,
       :setting_crop_images,
+      :setting_manual_publish,
+      :setting_style_dashed_nest,
+      :setting_style_underline_a,
+      :setting_style_css_profile,
+      :setting_style_css_webapp,
+      :setting_style_wide_media,
+      :setting_publish_in,
+      :setting_unpublish_in,
+      :setting_unpublish_delete,
+      :setting_boost_every,
+      :setting_boost_jitter,
+      :setting_boost_random,
+      :setting_filter_to_unknown,
+      :setting_filter_from_unknown,
+      :setting_unpublish_on_delete,
+      :setting_rss_disabled,
       notification_emails: %i(follow follow_request reblog favourite mention digest report pending_account trending_tag),
       interactions: %i(must_be_follower must_be_following must_be_following_dm)
     )
diff --git a/app/controllers/settings/profiles_controller.rb b/app/controllers/settings/profiles_controller.rb
index 19a7ce157..8c4efa21d 100644
--- a/app/controllers/settings/profiles_controller.rb
+++ b/app/controllers/settings/profiles_controller.rb
@@ -23,7 +23,9 @@ class Settings::ProfilesController < Settings::BaseController
   private
 
   def account_params
-    params.require(:account).permit(:display_name, :note, :avatar, :header, :locked, :bot, :discoverable, fields_attributes: [:name, :value])
+    params.require(:account).permit(:display_name, :note, :avatar, :header, :locked, :bot, :discoverable,
+                                    :require_dereference, :show_replies, :show_unlisted, :private, :require_auth,
+                                    fields_attributes: [:name, :value])
   end
 
   def set_account