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/form/admin_settings.rb4
-rw-r--r--app/models/status.rb41
-rw-r--r--app/models/user.rb5
3 files changed, 9 insertions, 41 deletions
diff --git a/app/models/form/admin_settings.rb b/app/models/form/admin_settings.rb
index 40e1da84b..7e68196a7 100644
--- a/app/models/form/admin_settings.rb
+++ b/app/models/form/admin_settings.rb
@@ -32,8 +32,6 @@ class Form::AdminSettings
     thumbnail
     hero
     mascot
-    show_reblogs_in_public_timelines
-    show_replies_in_public_timelines
     auto_reject_unknown
     auto_mark_known
     auto_mark_instance_actors_known
@@ -60,8 +58,6 @@ class Form::AdminSettings
     profile_directory
     hide_followers_count
     enable_keybase
-    show_reblogs_in_public_timelines
-    show_replies_in_public_timelines
     auto_reject_unknown
     auto_mark_known
     auto_mark_instance_actors_known
diff --git a/app/models/status.rb b/app/models/status.rb
index e707f3683..e4cbfd2a6 100644
--- a/app/models/status.rb
+++ b/app/models/status.rb
@@ -500,25 +500,17 @@ class Status < ApplicationRecord
     end
 
     def as_public_timeline(account = nil, local_only = false)
-      if local_only || account.nil? || account&.user&.setting_rawr_federated
-        query = timeline_scope(local_only)
-      else
-        query = Status.curated
-      end
-
-      query = query.without_replies unless Setting.show_replies_in_public_timelines
-
-      if account.present? && account.local?
+      query = (local_only || account.nil?) ? timeline_scope(local_only) : curated
+      if account&.local?
         query = query.without_reblogs if account&.user&.hide_boosts
-        query = query.only_followers_of(account) if account&.user&.only_known
+        query = query.only_followers_of(account) if account&.user&.only_known?
       end
-
       apply_timeline_filters(query, account, local_only)
     end
 
     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&.only_known?
+      query = query.only_followers_of(account) if account&.local? && account&.user&.only_known?
       apply_timeline_filters(query, account, local_only, true)
     end
 
@@ -592,23 +584,13 @@ class Status < ApplicationRecord
     private
 
     def timeline_scope(local_only = false)
-      starting_scope = local_only ? Status.network : Status
-      starting_scope = local_only ? starting_scope.public_local_visibility : starting_scope.with_public_visibility
-      if Setting.show_reblogs_in_public_timelines
-        starting_scope
-      else
-        starting_scope.without_reblogs
-      end
+      starting_scope = local_only ? Status.network.public_local_visibility : Status.with_public_visibility
+      starting_scope.without_reblogs
     end
 
     def browsable_timeline_scope(local_only = false)
       starting_scope = local_only ? Status.network : Status
-      starting_scope = starting_scope.public_browsable
-      if Setting.show_reblogs_in_public_timelines
-        starting_scope
-      else
-        starting_scope.without_reblogs
-      end
+      starting_scope.public_browsable.without_reblogs
     end
 
     def tag_timeline_scope(account = nil, local_only = false, priv = false)
@@ -616,15 +598,10 @@ class Status < ApplicationRecord
         return Status.none if account.nil?
         starting_scope = account.statuses
       else
-        starting_scope = local_only ? Status.network : Status
-        starting_scope = starting_scope.public_browsable
+        starting_scope = (local_only ? Status.network : Status).public_browsable
       end
 
-      if Setting.show_reblogs_in_public_timelines
-        starting_scope
-      else
-        starting_scope.without_reblogs
-      end
+      starting_scope.without_reblogs
     end
 
     def apply_timeline_filters(query, account = nil, local_only = false, tag_timeline = false)
diff --git a/app/models/user.rb b/app/models/user.rb
index 52d9a2add..7d6969745 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -130,7 +130,6 @@ class User < ApplicationRecord
 
   delegate :default_local,
     :always_local,
-    :rawr_federated,
     :hide_stats,
     :force_lowercase,
     :hide_captions,
@@ -416,10 +415,6 @@ class User < ApplicationRecord
     @always_local_only ||= (settings.always_local || false)
   end
 
-  def wants_raw_federated?
-    @wants_raw_federated ||= (settings.rawr_federated || false)
-  end
-
   def hides_stats?
     @hides_stats ||= (settings.hide_stats || false)
   end