forked from AkkomaGang/akkoma
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 @@ def make_user_from_ap_id(ap_id, additional \\ []) 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 @@ def make_user_from_ap_id(ap_id, additional \\ []) 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 @@ def make_user_from_ap_id(ap_id, additional \\ []) do
|
|||
|> User.remote_user_changeset()
|
||||
|> Repo.insert()
|
||||
|> User.set_cache()
|
||||
|> tap(fn _ -> enqueue_pin_fetches(data) end)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue