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) |> select([r, u], u.follower_address)
|> Repo.all() |> Repo.all()
if user.nickname in [nil, "internal.fetch"] do if not user.local or user.nickname in [nil, "internal.fetch"] do
following following
else else
[user.follower_address | following] [user.follower_address | following]

View File

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