about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorFire Demon <firedemon@creature.cafe>2020-09-21 21:15:33 -0500
committerFire Demon <firedemon@creature.cafe>2020-09-21 21:15:33 -0500
commit6fedf5a6e283a7a615920b48da40aa5d9ef1fd4e (patch)
tree4adffe4b81a8b1410f836cc8e46a8efb9464d58d /app/models
parent1575d744fb45605b918f75ebb9ea67e53cb774a2 (diff)
Add option to filter boosts from home timeline at backend level
Diffstat (limited to 'app/models')
-rw-r--r--app/models/user.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 5f2edab57..9218abbb7 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -124,7 +124,7 @@ class User < ApplicationRecord
            :style_wide_media,
            :publish_in, :unpublish_in, :unpublish_delete, :boost_every, :boost_jitter,
            :boost_random, :filter_from_unknown, :unpublish_on_delete,
-           :rss_disabled,
+           :rss_disabled, :no_boosts_home,
            to: :settings, prefix: :setting, allow_nil: false
 
   attr_reader :invite_code, :sign_in_token_attempt
@@ -263,6 +263,10 @@ class User < ApplicationRecord
     @shows_application ||= settings.show_application
   end
 
+  def disables_home_reblogs?
+    @disables_home_reblogs ||= settings.no_boosts_home
+  end
+
   # rubocop:disable Naming/MethodParameterName
   def token_for_app(a)
     return nil if a.nil? || a.owner != self