Use standard base url in User.
authorRoger Braun <roger@rogerbraun.net>
Mon, 3 Apr 2017 16:27:47 +0000 (18:27 +0200)
committerRoger Braun <roger@rogerbraun.net>
Mon, 3 Apr 2017 16:27:47 +0000 (18:27 +0200)
lib/pleroma/user.ex

index 67f590ee85a841b183de393b4a8cd553a8b9f297..c77704db0c9b0184f78d072548b719a079b58cb5 100644 (file)
@@ -16,12 +16,7 @@ defmodule Pleroma.User do
   end
 
   def ap_id(%User{nickname: nickname}) do
-    host =
-      Application.get_env(:pleroma, Pleroma.Web.Endpoint)
-      |> Keyword.fetch!(:url)
-      |> Keyword.fetch!(:host)
-
-    "https://#{host}/users/#{nickname}"
+    "#{Pleroma.Web.base_url}/users/#{nickname}"
   end
 
   def ap_followers(%User{} = user) do