Apply suggestion to lib/pleroma/web/activity_pub/activity_pub_controller.ex

This commit is contained in:
rinpatch 2019-09-13 10:09:56 +00:00
parent 5170170483
commit 3896a51b8a

View File

@ -72,9 +72,8 @@ def object(conn, %{"uuid" => uuid}) do
end end
def track_object_fetch(conn, object_id) do def track_object_fetch(conn, object_id) do
case conn.assigns[:user] do with %{assigns: %{user: %User{id: user_id}}} <- conn do
%User{id: user_id} -> Delivery.create(object_id, user_id) Delivery.create(object_id, user_id)
_ -> nil
end end
conn conn