From e6286152b94efcab355465875208e2a200760f03 Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Wed, 13 Sep 2017 16:05:39 +0200 Subject: [PATCH] Fix logic. --- lib/pleroma/web/mastodon_api/views/account_view.ex | 4 ++-- test/web/mastodon_api/account_view_test.exs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/pleroma/web/mastodon_api/views/account_view.ex b/lib/pleroma/web/mastodon_api/views/account_view.ex index 4e9ee4132..4f65eb772 100644 --- a/lib/pleroma/web/mastodon_api/views/account_view.ex +++ b/lib/pleroma/web/mastodon_api/views/account_view.ex @@ -43,8 +43,8 @@ defmodule Pleroma.Web.MastodonAPI.AccountView 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, diff --git a/test/web/mastodon_api/account_view_test.exs b/test/web/mastodon_api/account_view_test.exs index 259258281..c8f33f98c 100644 --- a/test/web/mastodon_api/account_view_test.exs +++ b/test/web/mastodon_api/account_view_test.exs @@ -49,8 +49,8 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do expected = %{ id: other_user.id, - following: false, - followed_by: true, + following: true, + followed_by: false, blocking: false, muting: false, requested: false,