Commit a1aacc08 authored by vaartis's avatar vaartis
Browse files

Check if the user has indeed not been federated with

Just updating the user triggered post fetching too, now it
shouldn't. It only happened in the AP user fetching since that's
what's used to update users
parent 9073039d
......@@ -1159,9 +1159,12 @@ def get_or_fetch_by_ap_id(ap_id) do
if !is_nil(user) and !User.needs_update?(user) do
user
else
# Whether to fetch initial posts for the user (if it's a new user & the fetching is enabled)
should_fetch_initial = is_nil(user) and Pleroma.Config.get([:fetch_initial_posts, :enabled])
user = fetch_by_ap_id(ap_id)
if Pleroma.Config.get([:fetch_initial_posts, :enabled]) do
if should_fetch_initial do
with %User{} = user do
{:ok, _} = Task.start(__MODULE__, :fetch_initial_posts, [user])
end
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment