about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/status.rb8
-rw-r--r--app/models/user.rb12
2 files changed, 6 insertions, 14 deletions
diff --git a/app/models/status.rb b/app/models/status.rb
index 8f618ed31..8a1680ccf 100644
--- a/app/models/status.rb
+++ b/app/models/status.rb
@@ -393,7 +393,7 @@ class Status < ApplicationRecord
 
     def as_home_timeline(account)
       query = where(account: [account] + account.following, visibility: [:public, :unlisted, :local, :private])
-      query = query.without_reblogs if account.present? && account&.user&.hides_boosts?
+      query = query.without_reblogs if account.present? && account&.user&.hide_boosts
       query
     end
 
@@ -448,8 +448,8 @@ class Status < ApplicationRecord
       query = query.without_replies unless Setting.show_replies_in_public_timelines
 
       if account.present? && account.local?
-        query = query.without_reblogs if account&.user&.hides_boosts?
-        query = query.only_followers_of(account) if account&.user&.shows_only_known?
+        query = query.without_reblogs if account&.user&.hide_boosts
+        query = query.only_followers_of(account) if account&.user&.only_known
       end
 
       apply_timeline_filters(query, account, local_only)
@@ -457,7 +457,7 @@ class Status < ApplicationRecord
 
     def as_tag_timeline(tag, account = nil, local_only = false, priv = false)
       query = tag_timeline_scope(account, local_only, priv).tagged_with(tag)
-      query = query.only_followers_of(account) if account.present? && account.local? && account&.user&.shows_only_known?
+      query = query.only_followers_of(account) if account.present? && account.local? && account&.user&.only_known?
       apply_timeline_filters(query, account, local_only, true)
     end
 
diff --git a/app/models/user.rb b/app/models/user.rb
index afea5be6d..59067cb36 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -39,6 +39,8 @@
 #  created_by_application_id :bigint(8)
 #  approved                  :boolean          default(TRUE), not null
 #  vars                      :jsonb            not null
+#  hide_boosts               :boolean
+#  only_known                :boolean
 #
 
 class User < ApplicationRecord
@@ -132,8 +134,6 @@ class User < ApplicationRecord
     :hide_mntions_blocker,
     :hide_mntions_packm8,
     :hide_mascot,
-    :hide_boosts,
-    :only_known,
     :hide_interactions,
     :hide_public_profile,
     :hide_public_outbox,
@@ -307,14 +307,6 @@ class User < ApplicationRecord
     @hides_mascot ||= (settings.hide_mascot || false)
   end
 
-  def hides_boosts?
-    @hides_boosts ||= (settings.hide_boosts || false)
-  end
-
-  def shows_only_known?
-    @only_known ||= (settings.only_known || false)
-  end
-
   def hides_interactions?
     @hides_interactions ||= (settings.hide_interactions || false)
   end