Merge branch 'fix/follow-requests-deleted-accounts' into 'develop'

user: check that the follow request actually has an active account associated with it

See merge request pleroma/pleroma!623
This commit is contained in:
kaniini 2019-01-03 18:53:30 +00:00
commit eaaf701319
1 changed files with 1 additions and 0 deletions

View File

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