diff options
author | rinpatch <rinpatch@sdf.org> | 2020-05-12 16:44:58 +0000 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2020-05-12 16:44:58 +0000 |
commit | 4cc71aad654201e3c3ad483b2be6e1d26a9c6df6 (patch) | |
tree | b853d85e34579c97ed707e3a27f39e84c2626fbe /lib | |
parent | fdc9ac88976c229288052cd66cda6b37e3887200 (diff) | |
parent | ca31af473c556f8320914f0621d08d59c96d3bef (diff) | |
download | pleroma-4cc71aad654201e3c3ad483b2be6e1d26a9c6df6.tar.gz pleroma-4cc71aad654201e3c3ad483b2be6e1d26a9c6df6.zip |
Merge branch '1748-remote-following-follower-count' into 'develop'
Transmogrifier: On incoming follow accept, update follow counts.
Closes #1748
See merge request pleroma/pleroma!2515
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/activity_pub/transmogrifier.ex | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/pleroma/web/activity_pub/transmogrifier.ex b/lib/pleroma/web/activity_pub/transmogrifier.ex index 921576617..80701bb63 100644 --- a/lib/pleroma/web/activity_pub/transmogrifier.ex +++ b/lib/pleroma/web/activity_pub/transmogrifier.ex @@ -592,6 +592,9 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do {:ok, follow_activity} <- Utils.update_follow_state_for_all(follow_activity, "accept"), %User{local: true} = follower <- User.get_cached_by_ap_id(follow_activity.data["actor"]), {:ok, _relationship} <- FollowingRelationship.update(follower, followed, :follow_accept) do + User.update_follower_count(followed) + User.update_following_count(follower) + ActivityPub.accept(%{ to: follow_activity.data["to"], type: "Accept", @@ -601,7 +604,8 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do activity_id: id }) else - _e -> :error + _e -> + :error end end |