Add follow information refetching after following/unfollowing

This commit is contained in:
rinpatch 2019-07-14 01:58:39 +03:00
commit 0c2dcb4c69
4 changed files with 98 additions and 42 deletions

View file

@ -1232,9 +1232,9 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do
following_address: "http://localhost:4001/users/fuser2/following"
)
{:ok, user} = ActivityPub.fetch_follow_information_for_user(user)
assert user.info.follower_count == 527
assert user.info.following_count == 267
{:ok, info} = ActivityPub.fetch_follow_information_for_user(user)
assert info.follower_count == 527
assert info.following_count == 267
end
test "detects hidden followers" do
@ -1265,9 +1265,9 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do
following_address: "http://localhost:4001/users/masto_closed/following"
)
{:ok, user} = ActivityPub.fetch_follow_information_for_user(user)
assert user.info.hide_followers == true
assert user.info.hide_follows == false
{:ok, info} = ActivityPub.fetch_follow_information_for_user(user)
assert info.hide_followers == true
assert info.hide_follows == false
end
test "detects hidden follows" do
@ -1298,9 +1298,9 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do
following_address: "http://localhost:4001/users/masto_closed/following"
)
{:ok, user} = ActivityPub.fetch_follow_information_for_user(user)
assert user.info.hide_followers == false
assert user.info.hide_follows == true
{:ok, info} = ActivityPub.fetch_follow_information_for_user(user)
assert info.hide_followers == false
assert info.hide_follows == true
end
end
end