about summary refs log tree commit diff
path: root/app/policies/status_policy.rb
diff options
context:
space:
mode:
authorFire Demon <firedemon@creature.cafe>2020-07-28 20:40:25 -0500
committerFire Demon <firedemon@creature.cafe>2020-08-30 05:45:16 -0500
commit054e15e4f03eecb174374466581b9662a6b38e24 (patch)
tree80db06ea08762f659878d8ffe2ffb4f54333b9c6 /app/policies/status_policy.rb
parent9234fb32e6b2b8bf8fb2184f9b1b57202eb5f625 (diff)
[Privacy] Add options for private accounts
Diffstat (limited to 'app/policies/status_policy.rb')
-rw-r--r--app/policies/status_policy.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/policies/status_policy.rb b/app/policies/status_policy.rb
index 69d18c4bf..317f450eb 100644
--- a/app/policies/status_policy.rb
+++ b/app/policies/status_policy.rb
@@ -91,13 +91,13 @@ class StatusPolicy < ApplicationPolicy
   end
 
   def author_blocking?
-    return false if current_account.nil?
+    return author.require_auth? if current_account.nil?
 
     @preloaded_relations[:blocked_by] ? @preloaded_relations[:blocked_by][author.id] : author.blocking?(current_account)
   end
 
   def parent_author_blocking?
-    return false if current_account.nil? || parent_author.nil?
+    return parent_author&.require_auth? if current_account.nil? || parent_author.nil?
 
     @preloaded_relations[:blocked_by] ? @preloaded_relations[:blocked_by][parent_author.id] : parent_author.blocking?(current_account)
   end
@@ -162,7 +162,7 @@ class StatusPolicy < ApplicationPolicy
   end
 
   def public_conversation?
-    @public_conversation ||= (record.conversation&.public? || false)
+    @public_conversation ||= record.conversation&.public? || false
   end
 
   def visibility_for_remote_domain