From 275c42e4382b47099d6bf70404ab8a97768628b5 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sun, 5 Aug 2018 01:10:05 +0000 Subject: [PATCH] user: filter out duplicate follow requests --- lib/pleroma/user.ex | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index df22d29a8..fa0ea171d 100644 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@ -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