Fix logic.

This commit is contained in:
Roger Braun 2017-09-13 16:05:39 +02:00
parent 49929321c7
commit e6286152b9
2 changed files with 4 additions and 4 deletions

View File

@ -43,8 +43,8 @@ def render("mention.json", %{user: user}) do
def render("relationship.json", %{user: user, target: target}) do
%{
id: target.id,
following: User.following?(target, user),
followed_by: User.following?(user, target),
following: User.following?(user, target),
followed_by: User.following?(target, user),
blocking: false,
muting: false,
requested: false,

View File

@ -49,8 +49,8 @@ test "represent a relationship" do
expected = %{
id: other_user.id,
following: false,
followed_by: true,
following: true,
followed_by: false,
blocking: false,
muting: false,
requested: false,