mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-10 18:17:55 +00:00
Only run the fix-up tasks once.
This commit is contained in:
parent
a91adb146e
commit
8228ae96d8
|
@ -266,9 +266,11 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
|
||||||
data = data
|
data = data
|
||||||
|> Map.put(:info, Map.merge(user.info, data[:info]))
|
|> Map.put(:info, Map.merge(user.info, data[:info]))
|
||||||
|
|
||||||
|
already_ap = User.ap_enabled?(user)
|
||||||
{:ok, user} = User.upgrade_changeset(user, data)
|
{:ok, user} = User.upgrade_changeset(user, data)
|
||||||
|> Repo.update()
|
|> Repo.update()
|
||||||
|
|
||||||
|
if !already_ap do
|
||||||
# This could potentially take a long time, do it in the background
|
# This could potentially take a long time, do it in the background
|
||||||
if async do
|
if async do
|
||||||
Task.start(fn ->
|
Task.start(fn ->
|
||||||
|
@ -277,6 +279,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
|
||||||
else
|
else
|
||||||
user_upgrade_task(user)
|
user_upgrade_task(user)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
{:ok, user}
|
{:ok, user}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue