1
0
mirror of https://github.com/funamitech/mastodon synced 2024-11-30 07:49:04 +09:00

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

This commit is contained in:
Surinna Curtis 2017-09-09 05:05:43 -05:00
parent 83b3a0389c
commit 7dbcc7ed3d

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)