From 778b213945215a61bc7ea08150a0858a71f09775 Mon Sep 17 00:00:00 2001 From: Floatingghost Date: Sat, 1 Jun 2024 08:25:35 +0100 Subject: [PATCH] enqueue pin fetches after changeset validation --- lib/pleroma/web/activity_pub/activity_pub.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex index ab9750611..c1b7bc71a 100644 --- a/lib/pleroma/web/activity_pub/activity_pub.ex +++ b/lib/pleroma/web/activity_pub/activity_pub.ex @@ -1845,8 +1845,6 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do Transmogrifier.upgrade_user_from_ap_id(ap_id) else with {:ok, data} <- fetch_and_prepare_user_from_ap_id(ap_id, additional) do - enqueue_pin_fetches(data) - user = if data.ap_id != ap_id do User.get_cached_by_ap_id(data.ap_id) @@ -1858,6 +1856,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do user |> User.remote_user_changeset(data) |> User.update_and_set_cache() + |> tap(fn _ -> enqueue_pin_fetches(data) end) else maybe_handle_clashing_nickname(data) @@ -1865,6 +1864,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do |> User.remote_user_changeset() |> Repo.insert() |> User.set_cache() + |> tap(fn _ -> enqueue_pin_fetches(data) end) end end end