about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorSurinna Curtis <ekiru.0@gmail.com>2017-09-09 05:05:43 -0500
committerSurinna Curtis <ekiru.0@gmail.com>2017-09-13 21:47:30 -0500
commit7dbcc7ed3df9ed858ebdd44607d2baa0b2939b4c (patch)
tree40e174374e99261e0dfd58f9f626fcf85be8bf5e /app/models
parent83b3a0389c60c3d9f4eb80030d44b5a0d9328114 (diff)
Expose whether a mute hides notifications in the api/v1/relationships endpoint
Diffstat (limited to 'app/models')
-rw-r--r--app/models/concerns/account_interactions.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/concerns/account_interactions.rb b/app/models/concerns/account_interactions.rb
index 976452f12..c258bfbfc 100644
--- a/app/models/concerns/account_interactions.rb
+++ b/app/models/concerns/account_interactions.rb
@@ -17,7 +17,11 @@ module AccountInteractions
     end
 
     def muting_map(target_account_ids, account_id)
-      follow_mapping(Mute.where(target_account_id: target_account_ids, account_id: account_id), :target_account_id)
+      Mute.where(target_account_id: target_account_ids, account_id: account_id).each_with_object({}) do |mute, mapping|
+        mapping[mute.target_account_id] = {
+          notifications: mute.hide_notifications?
+        }
+      end
     end
 
     def requested_map(target_account_ids, account_id)