Merge branch 'fix/follow-requests-deleted-accounts' into 'develop'
authorkaniini <nenolod@gmail.com>
Thu, 3 Jan 2019 18:53:30 +0000 (18:53 +0000)
committerkaniini <nenolod@gmail.com>
Thu, 3 Jan 2019 18:53:30 +0000 (18:53 +0000)
user: check that the follow request actually has an active account associated with it

See merge request pleroma/pleroma!623

lib/pleroma/user.ex

index 892f4e483be6e63ced3403abec02befc931a3a65..1edded4151fe0e4a16a9635acec473c04c77c6a8 100644 (file)
@@ -495,6 +495,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 -> !is_nil(u) end)
       |> Enum.filter(fn u -> !following?(u, user) end)
 
     {:ok, users}