diff options
author | Haelwenn <contact+git.pleroma.social@hacktivis.me> | 2020-03-31 22:04:02 +0000 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2020-04-02 22:55:09 +0300 |
commit | 01a3f145d51fe7aeb9050c89e03bebf10793aba3 (patch) | |
tree | 39a5965bc6e3cb663dbe1e83898f8533a9c67e1b /lib/pleroma/user.ex | |
parent | e97b50d17a1cb3355794d077ea15ed721613dfe9 (diff) | |
download | pleroma-01a3f145d51fe7aeb9050c89e03bebf10793aba3.tar.gz |
Merge branch 'bugfix/funkwhale-channel' into 'develop'
Fix profile url for funkwhale channels, removes one source_data use
Closes #1653
See merge request pleroma/pleroma!2333
Diffstat (limited to 'lib/pleroma/user.ex')
-rw-r--r-- | lib/pleroma/user.ex | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index 343bc27f5..faba3eb52 100644 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@ -276,16 +276,12 @@ defmodule Pleroma.User do end end - def profile_url(%User{source_data: %{"url" => url}}), do: url - def profile_url(%User{ap_id: ap_id}), do: ap_id - def profile_url(_), do: nil - def ap_id(%User{nickname: nickname}), do: "#{Web.base_url()}/users/#{nickname}" def ap_followers(%User{follower_address: fa}) when is_binary(fa), do: fa def ap_followers(%User{} = user), do: "#{ap_id(user)}/followers" - @spec ap_following(User.t()) :: Sring.t() + @spec ap_following(User.t()) :: String.t() def ap_following(%User{following_address: fa}) when is_binary(fa), do: fa def ap_following(%User{} = user), do: "#{ap_id(user)}/following" |