mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-10 19:29:11 +00:00
enqueue pin fetches after changeset validation
This commit is contained in:
parent
8f97c15b07
commit
778b213945
1 changed files with 2 additions and 2 deletions
|
@ -1845,8 +1845,6 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
|
||||||
Transmogrifier.upgrade_user_from_ap_id(ap_id)
|
Transmogrifier.upgrade_user_from_ap_id(ap_id)
|
||||||
else
|
else
|
||||||
with {:ok, data} <- fetch_and_prepare_user_from_ap_id(ap_id, additional) do
|
with {:ok, data} <- fetch_and_prepare_user_from_ap_id(ap_id, additional) do
|
||||||
enqueue_pin_fetches(data)
|
|
||||||
|
|
||||||
user =
|
user =
|
||||||
if data.ap_id != ap_id do
|
if data.ap_id != ap_id do
|
||||||
User.get_cached_by_ap_id(data.ap_id)
|
User.get_cached_by_ap_id(data.ap_id)
|
||||||
|
@ -1858,6 +1856,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
|
||||||
user
|
user
|
||||||
|> User.remote_user_changeset(data)
|
|> User.remote_user_changeset(data)
|
||||||
|> User.update_and_set_cache()
|
|> User.update_and_set_cache()
|
||||||
|
|> tap(fn _ -> enqueue_pin_fetches(data) end)
|
||||||
else
|
else
|
||||||
maybe_handle_clashing_nickname(data)
|
maybe_handle_clashing_nickname(data)
|
||||||
|
|
||||||
|
@ -1865,6 +1864,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
|
||||||
|> User.remote_user_changeset()
|
|> User.remote_user_changeset()
|
||||||
|> Repo.insert()
|
|> Repo.insert()
|
||||||
|> User.set_cache()
|
|> User.set_cache()
|
||||||
|
|> tap(fn _ -> enqueue_pin_fetches(data) end)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue