Return profile URL when available instead of actor URI for MastodonAPI mention URL
authorThibaut Girka <thib.pleroma-6b5f@sitedethib.com>
Wed, 7 Aug 2019 20:29:30 +0000 (20:29 +0000)
committerThibaut Girka <thib.pleroma-6b5f@sitedethib.com>
Wed, 7 Aug 2019 20:29:30 +0000 (20:29 +0000)
Fixes #1165

lib/pleroma/web/mastodon_api/views/account_view.ex

index b2b06eeb9d305b7734a6f1bfd2a50f694b01e138..3212dcbc3518353d158ec87ca9673e9b552661da 100644 (file)
@@ -28,7 +28,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do
       id: to_string(user.id),
       acct: user.nickname,
       username: username_from_nickname(user.nickname),
-      url: user.ap_id
+      url: User.profile_url(user) || user.ap_id
     }
   end