From 7dbcc7ed3df9ed858ebdd44607d2baa0b2939b4c Mon Sep 17 00:00:00 2001 From: Surinna Curtis Date: Sat, 9 Sep 2017 05:05:43 -0500 Subject: Expose whether a mute hides notifications in the api/v1/relationships endpoint --- app/models/concerns/account_interactions.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app') 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) -- cgit