diff options
author | lain <lain@soykaf.club> | 2020-05-12 12:29:37 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-05-12 12:29:37 +0200 |
commit | ca31af473c556f8320914f0621d08d59c96d3bef (patch) | |
tree | d53ed0fa9dcfccbe9c8214739df96f380e9eff33 /lib | |
parent | f8190aea5e68a6e17ccc88b13486bd69c3b08450 (diff) | |
download | pleroma-ca31af473c556f8320914f0621d08d59c96d3bef.tar.gz pleroma-ca31af473c556f8320914f0621d08d59c96d3bef.zip |
Transmogrifier: On incoming follow accept, update follow counts.
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 |