mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 16:40:29 +00:00
user: check that the follow request actually has an active account associated with it
because of user refetch, accounts can stop existing (get_from_ap_id() can fail), accordingly filter the follow requests for these failures.
This commit is contained in:
parent
d1983ed028
commit
eb1a18d22f
1 changed files with 1 additions and 0 deletions
|
@ -495,6 +495,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 -> !is_nil(u) end)
|
||||||
|> Enum.filter(fn u -> !following?(u, user) end)
|
|> Enum.filter(fn u -> !following?(u, user) end)
|
||||||
|
|
||||||
{:ok, users}
|
{:ok, users}
|
||||||
|
|
Loading…
Reference in a new issue