Merge remote-tracking branch 'upstream/develop' into admin-create-users
[akkoma] / lib / pleroma / web / mastodon_api / views / account_view.ex
index 779b9a3824043aeb690451c68f79f4bd7c061a18..b82d3319b4c4d40da6ef356ed61eb2b0e00dca91 100644 (file)
@@ -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 && !User.following?(target, user) do
         follow_activity.data["state"] == "pending"
       else
         false
@@ -112,7 +112,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do
       fields: fields,
       bot: bot,
       source: %{
-        note: "",
+        note: HTML.strip_tags((user.bio || "") |> String.replace("<br>", "\n")),
         sensitive: false,
         pleroma: %{}
       },