about summary refs log tree commit diff
path: root/app/controllers/api
diff options
context:
space:
mode:
authorFire Demon <firedemon@creature.cafe>2020-11-23 23:10:05 -0600
committerFire Demon <firedemon@creature.cafe>2020-11-23 23:10:05 -0600
commit65a9abb315f18ac777f3d0e09b3f7399830ad243 (patch)
tree39712b50201749efad11dce09561d81f4bdcdb2f /app/controllers/api
parent7f5ba917563aa1c9a373d9dd3a6a29f73d81ee9a (diff)
Add user options to disable recipient verification, allow anonymous public access; rework private mode
Diffstat (limited to 'app/controllers/api')
-rw-r--r--app/controllers/api/v1/accounts/statuses_controller.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/controllers/api/v1/accounts/statuses_controller.rb b/app/controllers/api/v1/accounts/statuses_controller.rb
index a0ce810ad..91b8629e3 100644
--- a/app/controllers/api/v1/accounts/statuses_controller.rb
+++ b/app/controllers/api/v1/accounts/statuses_controller.rb
@@ -22,7 +22,7 @@ class Api::V1::Accounts::StatusesController < Api::BaseController
   end
 
   def load_statuses
-    @account.suspended? ? [] : cached_account_statuses
+    unauthorized? ? [] : cached_account_statuses
   end
 
   def cached_account_statuses
@@ -39,7 +39,6 @@ class Api::V1::Accounts::StatusesController < Api::BaseController
 
   def permitted_account_statuses
     return mentions_scope if truthy_param?(:mentions)
-    return Status.none if unauthorized?
 
     @account.statuses.permitted_for(
       @account,
@@ -58,7 +57,7 @@ class Api::V1::Accounts::StatusesController < Api::BaseController
   end
 
   def unauthorized?
-    (@account.private && !following?(@account)) || (@account.require_auth && !current_account?)
+    @account.suspended? || (@account.private? && !following?(@account))
   end
 
   def include_reblogs?