about summary refs log tree commit diff
path: root/app/controllers
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-12-19 20:43:53 -0600
committermultiple creatures <dev@multiple-creature.party>2019-12-19 20:48:20 -0600
commit82f98a770b088a3ffb2c165fd22ccb0adadd57a7 (patch)
treea87c075a92305ef696cedc6c255c963bf283c0ec /app/controllers
parent32d998b62333a768af3a274d265fd02483ce15de (diff)
rework hide boosts / show only packmates options to work with timeline streaming
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/api/v1/timelines/home_controller.rb2
-rw-r--r--app/controllers/api/v1/timelines/list_controller.rb2
-rw-r--r--app/controllers/settings/preferences_controller.rb4
3 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/api/v1/timelines/home_controller.rb b/app/controllers/api/v1/timelines/home_controller.rb
index 01d4e3360..bd3bac0fe 100644
--- a/app/controllers/api/v1/timelines/home_controller.rb
+++ b/app/controllers/api/v1/timelines/home_controller.rb
@@ -23,7 +23,7 @@ class Api::V1::Timelines::HomeController < Api::BaseController
   end
 
   def cached_home_statuses
-    if current_account&.user&.hides_boosts?
+    if current_account&.user&.hide_boosts
       cache_collection home_statuses.without_reblogs, Status
     else
       cache_collection home_statuses, Status
diff --git a/app/controllers/api/v1/timelines/list_controller.rb b/app/controllers/api/v1/timelines/list_controller.rb
index 15934adb3..7eb656745 100644
--- a/app/controllers/api/v1/timelines/list_controller.rb
+++ b/app/controllers/api/v1/timelines/list_controller.rb
@@ -25,7 +25,7 @@ class Api::V1::Timelines::ListController < Api::BaseController
   end
 
   def cached_list_statuses
-    if current_account&.user&.hides_boosts?
+    if current_account&.user&.hide_boosts
       cache_collection list_statuses.without_reblogs, Status
     else
       cache_collection list_statuses, Status
diff --git a/app/controllers/settings/preferences_controller.rb b/app/controllers/settings/preferences_controller.rb
index 3ea166c31..66e9033d3 100644
--- a/app/controllers/settings/preferences_controller.rb
+++ b/app/controllers/settings/preferences_controller.rb
@@ -27,6 +27,8 @@ class Settings::PreferencesController < Settings::BaseController
   def user_params
     params.require(:user).permit(
       :locale,
+      :hide_boosts,
+      :only_known,
       chosen_languages: []
     )
   end
@@ -51,8 +53,6 @@ class Settings::PreferencesController < Settings::BaseController
       :setting_hide_mntions_blocked,
       :setting_hide_mntions_blocker,
       :setting_hide_mntions_packm8,
-      :setting_hide_boosts,
-      :setting_only_known,
       :setting_gently_kobolds,
       :setting_user_is_kobold,
       :setting_hide_mascot,