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
def track_object_fetch(conn, object_id) do
case conn.assigns[:user] do
%User{id: user_id} -> Delivery.create(object_id, user_id)
_ -> nil
with %{assigns: %{user: %User{id: user_id}}} <- conn do
Delivery.create(object_id, user_id)
end
conn