Never update local users from foreign sources.

This commit is contained in:
lain 2018-02-24 12:05:40 +01:00
parent 6744710908
commit 06b512acf1
1 changed files with 1 additions and 1 deletions

View File

@ -214,7 +214,7 @@ defp user_upgrade_task(user) do
end end
def upgrade_user_from_ap_id(ap_id, async \\ true) do def upgrade_user_from_ap_id(ap_id, async \\ true) do
with %User{} = user <- User.get_by_ap_id(ap_id), with %User{local: false} = user <- User.get_by_ap_id(ap_id),
{:ok, data} <- ActivityPub.fetch_and_prepare_user_from_ap_id(ap_id) do {:ok, data} <- ActivityPub.fetch_and_prepare_user_from_ap_id(ap_id) do
data = data data = data
|> Map.put(:info, Map.merge(user.info, data[:info])) |> Map.put(:info, Map.merge(user.info, data[:info]))