MastoAPI account_view.ex: requested is false when following is true

Closes: https://git.pleroma.social/pleroma/pleroma/issues/903
This commit is contained in:
Haelwenn (lanodan) Monnier 2019-05-17 07:34:52 +02:00
parent 99f50bf3e8
commit 68c75a08e8
No known key found for this signature in database
GPG key ID: D5B7A8E43C997DEE

View file

@ -40,7 +40,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do
follow_activity = Pleroma.Web.ActivityPub.Utils.fetch_latest_follow(user, target) follow_activity = Pleroma.Web.ActivityPub.Utils.fetch_latest_follow(user, target)
requested = requested =
if follow_activity do if follow_activity and !User.following?(target, user) do
follow_activity.data["state"] == "pending" follow_activity.data["state"] == "pending"
else else
false false