From: Haelwenn (lanodan) Monnier Date: Fri, 17 May 2019 05:34:52 +0000 (+0200) Subject: MastoAPI account_view.ex: requested is false when following is true X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=68c75a08e8593d41f496a362ab1be43d054c09d5;p=akkoma MastoAPI account_view.ex: requested is false when following is true Closes: https://git.pleroma.social/pleroma/pleroma/issues/903 --- diff --git a/lib/pleroma/web/mastodon_api/views/account_view.ex b/lib/pleroma/web/mastodon_api/views/account_view.ex index 779b9a382..606a0f2ed 100644 --- a/lib/pleroma/web/mastodon_api/views/account_view.ex +++ b/lib/pleroma/web/mastodon_api/views/account_view.ex @@ -40,7 +40,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do follow_activity = Pleroma.Web.ActivityPub.Utils.fetch_latest_follow(user, target) requested = - if follow_activity do + if follow_activity and !User.following?(target, user) do follow_activity.data["state"] == "pending" else false