about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-04-25 12:37:40 -0500
committermultiple creatures <dev@multiple-creature.party>2019-05-21 03:16:22 -0500
commit9d4f42fb893c2129aa9f7aa9d012112af3646cae (patch)
treee64554e653d02195b5a220974ff3f635c7892cb4 /app/models
parentfb449f273a04545043a792b9fa63fdcc5b6b60b1 (diff)
Add option to hide public replies from profile
Diffstat (limited to 'app/models')
-rw-r--r--app/models/account.rb1
-rw-r--r--app/models/status.rb3
2 files changed, 3 insertions, 1 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
index deeea2f58..c07da2a14 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -48,6 +48,7 @@
 #  hidden                  :boolean
 #  hidden                  :boolean          default(FALSE), not null
 #  vars                    :jsonb            not null
+#  replies                 :boolean          default(TRUE), not null
 #
 
 class Account < ApplicationRecord
diff --git a/app/models/status.rb b/app/models/status.rb
index eff81cb4e..0baa5c98b 100644
--- a/app/models/status.rb
+++ b/app/models/status.rb
@@ -432,7 +432,8 @@ class Status < ApplicationRecord
       visibility = [:public, :unlisted]
 
       if account.nil?
-        where(visibility: visibility).not_local_only
+        query = where(visibility: visibility).not_local_only
+        target_account.replies ? query : query.without_replies
       elsif target_account.blocking?(account) # get rid of blocked peeps
         none
       elsif account.id == target_account.id # author can see own stuff