user: filter out duplicate follow requests

This commit is contained in:
William Pitcock 2018-08-05 01:10:05 +00:00
parent d7368ea272
commit 275c42e438

View File

@ -398,6 +398,7 @@ defmodule Pleroma.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 -> !following?(u, user) end)
{:ok, users} {:ok, users}
end end