For existing users, just replace info.
authorlain <lain@soykaf.club>
Sun, 18 Feb 2018 22:11:31 +0000 (23:11 +0100)
committerlain <lain@soykaf.club>
Sun, 18 Feb 2018 22:11:31 +0000 (23:11 +0100)
lib/pleroma/web/activity_pub/activity_pub.ex

index a0d36d03ad07ebb0bc36bc0117492279c0d9fd7c..4e46e80ea1128b4a2b15745be32ebdc7c678c374 100644 (file)
@@ -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