about summary refs log tree commit diff
path: root/app/controllers/api/v1/timelines/home_controller.rb
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-12-19 19:41:02 -0600
committermultiple creatures <dev@multiple-creature.party>2019-12-19 19:41:02 -0600
commit32d998b62333a768af3a274d265fd02483ce15de (patch)
tree8245f97e61ae116a9eb73512e7542ef703dedacc /app/controllers/api/v1/timelines/home_controller.rb
parent1fecec8fb6d1441078cf0cf36597007c53e81e6b (diff)
add preference options to a: hide boosts globally, & b: show only packmates across all timelines - works in all client apps
Diffstat (limited to 'app/controllers/api/v1/timelines/home_controller.rb')
-rw-r--r--app/controllers/api/v1/timelines/home_controller.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/api/v1/timelines/home_controller.rb b/app/controllers/api/v1/timelines/home_controller.rb
index fcd0757f1..01d4e3360 100644
--- a/app/controllers/api/v1/timelines/home_controller.rb
+++ b/app/controllers/api/v1/timelines/home_controller.rb
@@ -23,7 +23,11 @@ class Api::V1::Timelines::HomeController < Api::BaseController
   end
 
   def cached_home_statuses
-    cache_collection home_statuses, Status
+    if current_account&.user&.hides_boosts?
+      cache_collection home_statuses.without_reblogs, Status
+    else
+      cache_collection home_statuses, Status
+    end
   end
 
   def home_statuses