diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index 4f4fa70ca..eda26199b 100644 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@ -2294,7 +2294,7 @@ defmodule Pleroma.User do |> Map.put(:fields, fields) end - def get_domain(%User{ap_id: ap_id} = _user) do + def get_host(%User{ap_id: ap_id} = _user) do URI.parse(ap_id).host end end diff --git a/lib/pleroma/web/templates/o_auth/o_auth/show.html.eex b/lib/pleroma/web/templates/o_auth/o_auth/show.html.eex index 986baa966..1a85818ec 100644 --- a/lib/pleroma/web/templates/o_auth/o_auth/show.html.eex +++ b/lib/pleroma/web/templates/o_auth/o_auth/show.html.eex @@ -13,7 +13,7 @@
<% end %> diff --git a/test/user_test.exs b/test/user_test.exs index 3a624924a..cb8c39f27 100644 --- a/test/user_test.exs +++ b/test/user_test.exs @@ -1886,8 +1886,8 @@ defmodule Pleroma.UserTest do assert User.avatar_url(user, no_default: true) == nil end - test "get_domain/1" do + test "get_host/1" do user = insert(:user, ap_id: "https://lain.com/users/lain", nickname: "lain") - assert User.get_domain(user) == "lain.com" + assert User.get_host(user) == "lain.com" end end