From: lain Date: Sun, 18 Feb 2018 22:11:31 +0000 (+0100) Subject: For existing users, just replace info. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=8b1154633430d2f2c0cb7375bec66cf7f0f35583;p=akkoma For existing users, just replace info. --- diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex index a0d36d03a..4e46e80ea 100644 --- a/lib/pleroma/web/activity_pub/activity_pub.ex +++ b/lib/pleroma/web/activity_pub/activity_pub.ex @@ -273,6 +273,12 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do } User.insert_or_update_user(user_data) + if user = User.get_by_ap_id(ap_id) do + User.info_changeset(user, user_data} + |> Repo.update + else + User.insert_or_update_user(user_data) + end end end