X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Factivity_pub%2Factivity_pub.ex;h=4e46e80ea1128b4a2b15745be32ebdc7c678c374;hb=8b1154633430d2f2c0cb7375bec66cf7f0f35583;hp=168653035a3d056beb1aca744c904ba62b2b2ded;hpb=342d0b01d17b3035378d6906672e1e8c4008ff4c;p=akkoma diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex index 168653035..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 @@ -283,7 +289,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do end def publish(actor, activity) do - followers = if user.follower_address in activity.recipients do + followers = if actor.follower_address in activity.recipients do {:ok, followers} = User.get_followers(actor) followers else