Do not add follower_address to following for non local users

This commit is contained in:
Egor Kislitsyn 2019-10-14 13:50:43 +07:00
parent 059005ff82
commit 1d46944fbd
No known key found for this signature in database
GPG key ID: 1B49CB15B71E7805
2 changed files with 2 additions and 2 deletions

View file

@ -101,7 +101,7 @@ defmodule Pleroma.FollowingRelationship do
|> select([r, u], u.follower_address)
|> Repo.all()
if user.nickname in [nil, "internal.fetch"] do
if not user.local or user.nickname in [nil, "internal.fetch"] do
following
else
[user.follower_address | following]

View file

@ -243,7 +243,7 @@ defmodule Pleroma.UserTest do
user = User.get_cached_by_id(user.id)
assert User.following(user) == [user.follower_address]
assert User.following(user) == []
end
test "unfollow takes a user and another user" do