projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
For existing users, just replace info.
[akkoma]
/
lib
/
pleroma
/
web
/
activity_pub
/
activity_pub.ex
diff --git
a/lib/pleroma/web/activity_pub/activity_pub.ex
b/lib/pleroma/web/activity_pub/activity_pub.ex
index fb33f2e3ef2eddfc6e637fab797673acc3d0a443..4e46e80ea1128b4a2b15745be32ebdc7c678c374 100644
(file)
--- 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)
}
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
end
end
@@
-283,7
+289,12
@@
defmodule Pleroma.Web.ActivityPub.ActivityPub do
end
def publish(actor, activity) do
end
def publish(actor, activity) do
- {:ok, followers} = User.get_followers(actor)
+ followers = if actor.follower_address in activity.recipients do
+ {:ok, followers} = User.get_followers(actor)
+ followers
+ else
+ []
+ end
remote_inboxes = (Pleroma.Web.Salmon.remote_users(activity) ++ followers)
|> Enum.filter(fn (user) -> User.ap_enabled?(user) end)
remote_inboxes = (Pleroma.Web.Salmon.remote_users(activity) ++ followers)
|> Enum.filter(fn (user) -> User.ap_enabled?(user) end)