activitypub: user view: fix up endpoints rendering
authorWilliam Pitcock <nenolod@dereferenced.org>
Tue, 12 Feb 2019 21:42:32 +0000 (21:42 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Wed, 13 Feb 2019 19:34:43 +0000 (19:34 +0000)
lib/pleroma/web/activity_pub/views/user_view.ex

index 0d880212e1fed2bc9ed7aac1973d4c26796dbbcb..44beee728ac48af9a3d16636a2528e1322bda810 100644 (file)
@@ -15,12 +15,12 @@ defmodule Pleroma.Web.ActivityPub.UserView do
 
   import Ecto.Query
 
-  def render("endpoints.json", %{user: %{local: true} = _user}) do
+  def render("endpoints.json", %{user: %User{local: true} = _user}) do
     %{
       "oauthAuthorizationEndpoint" => "#{Pleroma.Web.Endpoint.url()}/oauth/authorize",
       "oauthTokenEndpoint" => "#{Pleroma.Web.Endpoint.url()}/oauth/token"
     }
-    |> Map.merge(render("endpoints.json", nil))
+    |> Map.merge(render("endpoints.json", %{user: nil}))
   end
 
   def render("endpoints.json", _) do