about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/controllers/settings/preferences_controller.rb1
-rw-r--r--app/lib/user_settings_decorator.rb5
-rw-r--r--app/models/form/admin_settings.rb4
-rw-r--r--app/models/status.rb41
-rw-r--r--app/models/user.rb5
-rw-r--r--app/services/fan_out_on_write_service.rb6
-rw-r--r--app/views/admin/settings/edit.html.haml6
-rw-r--r--app/views/settings/preferences/show.html.haml3
8 files changed, 12 insertions, 59 deletions
diff --git a/app/controllers/settings/preferences_controller.rb b/app/controllers/settings/preferences_controller.rb
index c64ae9ab7..56abd5d73 100644
--- a/app/controllers/settings/preferences_controller.rb
+++ b/app/controllers/settings/preferences_controller.rb
@@ -64,7 +64,6 @@ class Settings::PreferencesController < Settings::BaseController
     params.require(:user).permit(
       :setting_default_local,
       :setting_always_local,
-      :setting_rawr_federated,
       :setting_hide_stats,
       :setting_force_lowercase,
       :setting_hide_captions,
diff --git a/app/lib/user_settings_decorator.rb b/app/lib/user_settings_decorator.rb
index 8e95f518a..e38e47aa2 100644
--- a/app/lib/user_settings_decorator.rb
+++ b/app/lib/user_settings_decorator.rb
@@ -17,7 +17,6 @@ class UserSettingsDecorator
   def process_update
     user.settings['default_local']       = default_local_preference if change?('setting_default_local')
     user.settings['always_local']        = always_local_preference if change?('setting_always_local')
-    user.settings['rawr_federated']      = rawr_federated_preference if change?('setting_rawr_federated')
     user.settings['hide_stats']          = hide_stats_preference if change?('setting_hide_stats')
     user.settings['larger_menus']        = larger_menus_preference if change?('setting_larger_menus')
     user.settings['larger_buttons']      = larger_buttons_preference if change?('setting_larger_buttons')
@@ -233,10 +232,6 @@ class UserSettingsDecorator
     boolean_cast_setting 'setting_always_local'
   end
 
-  def rawr_federated_preference
-    boolean_cast_setting 'setting_rawr_federated'
-  end
-
   def hide_stats_preference
     boolean_cast_setting 'setting_hide_stats'
   end
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
diff --git a/app/services/fan_out_on_write_service.rb b/app/services/fan_out_on_write_service.rb
index 4d868b699..3bd3717fe 100644
--- a/app/services/fan_out_on_write_service.rb
+++ b/app/services/fan_out_on_write_service.rb
@@ -21,7 +21,7 @@ class FanOutOnWriteService < BaseService
       deliver_to_mentioned_followers(status)
     elsif status.local_visibility?
       deliver_to_followers(status) unless public_only || status.curated
-      return if status.reblog? && !Setting.show_reblogs_in_public_timelines
+      return if status.reblog?
       deliver_to_lists(status) unless public_only || status.curated
       deliver_to_local(status) unless filtered?(status)
     else
@@ -30,7 +30,7 @@ class FanOutOnWriteService < BaseService
         deliver_to_lists(status)
       end
 
-      return if status.reblog? && !Setting.show_reblogs_in_public_timelines
+      return if status.reblog?
       return if filtered?(status) || (status.reblog? && filtered?(status.reblog))
 
       if !status.reblog? && status.distributable?
@@ -53,7 +53,7 @@ class FanOutOnWriteService < BaseService
   private
 
   def filtered?(status)
-    status.account.silenced? || !Setting.show_replies_in_public_timelines && status.reply? && status.in_reply_to_account_id != status.account_id
+    status.account.silenced? || status.reply? && status.in_reply_to_account_id != status.account_id
   end
 
   def deliver_to_self(status)
diff --git a/app/views/admin/settings/edit.html.haml b/app/views/admin/settings/edit.html.haml
index 92900de85..8e58215ca 100644
--- a/app/views/admin/settings/edit.html.haml
+++ b/app/views/admin/settings/edit.html.haml
@@ -90,12 +90,6 @@
     = f.input :enable_keybase, as: :boolean, wrapper: :with_label, label: t('admin.settings.enable_keybase.title'), hint: t('admin.settings.enable_keybase.desc_html')
 
   .fields-group
-    = f.input :show_reblogs_in_public_timelines, as: :boolean, wrapper: :with_label, label: t('admin.settings.show_reblogs_in_public_timelines.title'), hint: t('admin.settings.show_reblogs_in_public_timelines.desc_html')
-
-  .fields-group
-    = f.input :show_replies_in_public_timelines, as: :boolean, wrapper: :with_label, label: t('admin.settings.show_replies_in_public_timelines.title'), hint: t('admin.settings.show_replies_in_public_timelines.desc_html')
-
-  .fields-group
     = f.input :spam_check_enabled, as: :boolean, wrapper: :with_label, label: t('admin.settings.spam_check_enabled.title'), hint: t('admin.settings.spam_check_enabled.desc_html')
 
   %hr.spacer/
diff --git a/app/views/settings/preferences/show.html.haml b/app/views/settings/preferences/show.html.haml
index c51f91bde..bda993bf6 100644
--- a/app/views/settings/preferences/show.html.haml
+++ b/app/views/settings/preferences/show.html.haml
@@ -88,9 +88,6 @@
     = f.input :filter_undescribed, as: :boolean, wrapper: :with_label
     = f.input :setting_hide_sensitive_cards, as: :boolean, wrapper: :with_label
 
-  .fields-group
-    = f.input :setting_rawr_federated, as: :boolean, wrapper: :with_label
-
   %hr/
 
   .fields-group