From: Roger Braun Date: Wed, 13 Sep 2017 14:05:39 +0000 (+0200) Subject: Fix logic. X-Git-Url: http://git.squeep.com/?a=commitdiff_plain;h=e6286152b94efcab355465875208e2a200760f03;p=akkoma Fix logic. --- 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,