Browse Source

Expose whether a mute hides notifications in the api/v1/relationships endpoint

closed-social-glitch-2
Surinna Curtis 7 years ago
parent
commit
7dbcc7ed3d
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      app/models/concerns/account_interactions.rb

+ 5
- 1
app/models/concerns/account_interactions.rb View File

@ -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)

Loading…
Cancel
Save