projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d1983ed
)
user: check that the follow request actually has an active account associated with it
author
William Pitcock
<nenolod@dereferenced.org>
Wed, 2 Jan 2019 22:47:12 +0000
(22:47 +0000)
committer
William Pitcock
<nenolod@dereferenced.org>
Wed, 2 Jan 2019 22:47:12 +0000
(22:47 +0000)
because of user refetch, accounts can stop existing (get_from_ap_id() can fail), accordingly
filter the follow requests for these failures.
lib/pleroma/user.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/user.ex
b/lib/pleroma/user.ex
index 892f4e483be6e63ced3403abec02befc931a3a65..1edded4151fe0e4a16a9635acec473c04c77c6a8 100644
(file)
--- a/
lib/pleroma/user.ex
+++ b/
lib/pleroma/user.ex
@@
-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}