user: filter out duplicate follow requests
authorWilliam Pitcock <nenolod@dereferenced.org>
Sun, 5 Aug 2018 01:10:05 +0000 (01:10 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Sun, 5 Aug 2018 01:11:13 +0000 (01:11 +0000)
lib/pleroma/user.ex

index df22d29a83f6ea66f45491cb419a2cf94e275b6b..fa0ea171d66a987b9086156e1b2763f093dd4a6d 100644 (file)
@@ -398,6 +398,7 @@ defmodule Pleroma.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