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:08:13 -0500
committermultiple creatures <dev@multiple-creature.party>2019-05-21 03:16:22 -0500
commitc983c4e9528cf4163655db079393ba343f571718 (patch)
tree5d7ee3cea108a0771fa99604c7e0c5442747e4d1 /app/controllers/api
parenta47b1daaebea09ca07ca93079e530f26cfeef914 (diff)
Privacy: add options to make interaction lists private and to not be included in public interaction lists.
Diffstat (limited to 'app/controllers/api')
-rw-r--r--app/controllers/api/v1/statuses/favourited_by_accounts_controller.rb3
-rw-r--r--app/controllers/api/v1/statuses/reblogged_by_accounts_controller.rb3
2 files changed, 4 insertions, 2 deletions
diff --git a/app/controllers/api/v1/statuses/favourited_by_accounts_controller.rb b/app/controllers/api/v1/statuses/favourited_by_accounts_controller.rb
index 657e57831..d9d4bf7f3 100644
--- a/app/controllers/api/v1/statuses/favourited_by_accounts_controller.rb
+++ b/app/controllers/api/v1/statuses/favourited_by_accounts_controller.rb
@@ -17,11 +17,12 @@ class Api::V1::Statuses::FavouritedByAccountsController < Api::BaseController
   private
 
   def load_accounts
+    return [] if @status.local? && @status.account.user.setting_hide_interactions
     default_accounts.merge(paginated_favourites).to_a
   end
 
   def default_accounts
-    Account
+    Account.without_unlisted
       .includes(:favourites, :account_stat)
       .references(:favourites)
       .where(favourites: { status_id: @status.id })
diff --git a/app/controllers/api/v1/statuses/reblogged_by_accounts_controller.rb b/app/controllers/api/v1/statuses/reblogged_by_accounts_controller.rb
index 6851099f6..15eb3a026 100644
--- a/app/controllers/api/v1/statuses/reblogged_by_accounts_controller.rb
+++ b/app/controllers/api/v1/statuses/reblogged_by_accounts_controller.rb
@@ -17,11 +17,12 @@ class Api::V1::Statuses::RebloggedByAccountsController < Api::BaseController
   private
 
   def load_accounts
+    return [] if @status.local? && @status.account.user.setting_hide_interactions
     default_accounts.merge(paginated_statuses).to_a
   end
 
   def default_accounts
-    Account.includes(:statuses, :account_stat).references(:statuses)
+    Account.without_unlisted.includes(:statuses, :account_stat).references(:statuses)
   end
 
   def paginated_statuses