aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibaut Girka <thib.pleroma-6b5f@sitedethib.com>2019-08-07 20:29:30 +0000
committerThibaut Girka <thib.pleroma-6b5f@sitedethib.com>2019-08-07 20:29:30 +0000
commita10c840abaeb8402051665412fbfd50e4a5ea054 (patch)
tree4a5f8cb1162d7df9ad9a36fa82fa8d28d0960f46
parentaa718ab8f6f290f2efb12354aff68b95e84125a4 (diff)
downloadpleroma-a10c840abaeb8402051665412fbfd50e4a5ea054.tar.gz
Return profile URL when available instead of actor URI for MastodonAPI mention URL
Fixes #1165
-rw-r--r--lib/pleroma/web/mastodon_api/views/account_view.ex2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pleroma/web/mastodon_api/views/account_view.ex b/lib/pleroma/web/mastodon_api/views/account_view.ex
index b2b06eeb9..3212dcbc3 100644
--- a/lib/pleroma/web/mastodon_api/views/account_view.ex
+++ b/lib/pleroma/web/mastodon_api/views/account_view.ex
@@ -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