Merge branch 'bugfix/duplicate-follow-requests' into 'develop'

user: filter out duplicate follow requests

Closes #228

See merge request pleroma/pleroma!263
This commit is contained in:
lambda 2018-08-06 18:07:27 +00:00
commit 59b42531a3

View file

@ -398,6 +398,7 @@ def get_follow_requests(%User{} = user) do
Enum.map(reqs, fn req -> req.actor end)
|> Enum.uniq()
|> Enum.map(fn ap_id -> get_by_ap_id(ap_id) end)
|> Enum.filter(fn u -> !following?(u, user) end)
{:ok, users}
end