commit: e6286152b94efcab355465875208e2a200760f03
parent: 49929321c761cf389d42ca52d88dc8ec09a375cc
Author: Roger Braun <rbraun@Bobble.local>
Date: Wed, 13 Sep 2017 16:05:39 +0200
Fix logic.
Diffstat:
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
@@ -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
@@ -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,