Simplify logic to mention.js `url` field
authorThibaut Girka <thib.pleroma-6b5f@sitedethib.com>
Wed, 7 Aug 2019 20:55:37 +0000 (20:55 +0000)
committerThibaut Girka <thib.pleroma-6b5f@sitedethib.com>
Wed, 7 Aug 2019 20:55:37 +0000 (20:55 +0000)
`User.profile_url` already fallbacks to ap_id

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

index 3212dcbc3518353d158ec87ca9673e9b552661da..82f8cd0207d0589b8361b47381e105684e4ccb3b 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.profile_url(user) || user.ap_id
+      url: User.profile_url(user)
     }
   end