about summary refs log tree commit diff
path: root/app/controllers/api
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-05-05 23:04:23 -0500
committermultiple creatures <dev@multiple-creature.party>2019-05-21 03:16:22 -0500
commita47b1daaebea09ca07ca93079e530f26cfeef914 (patch)
tree04f08b28710732d1a9747c64537cd75162a651ca /app/controllers/api
parent992218f05f76106857f2cb5a72c0bb4510aa4563 (diff)
Implement scoped tags; use `local:` and `self:` scopes for community and personal tags, respectively.
Diffstat (limited to 'app/controllers/api')
-rw-r--r--app/controllers/api/v1/accounts/statuses_controller.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/api/v1/accounts/statuses_controller.rb b/app/controllers/api/v1/accounts/statuses_controller.rb
index 8a216ce0d..11661ce08 100644
--- a/app/controllers/api/v1/accounts/statuses_controller.rb
+++ b/app/controllers/api/v1/accounts/statuses_controller.rb
@@ -72,7 +72,9 @@ class Api::V1::Accounts::StatusesController < Api::BaseController
     tag = Tag.find_normalized(params[:tagged])
 
     if tag
-      Status.tagged_with(tag.id)
+      return Status.none if !user_signed_in && (tag.local || tag.private) || tag.private && current_account.id != @account.id
+      scope = tag.private ? current_account.statuses : tag.local ? Status.local : Status
+      scope.tagged_with(tag.id)
     else
       Status.none
     end