Apply suggestion to lib/pleroma/web/activity_pub/activity_pub_controller.ex
This commit is contained in:
parent
5170170483
commit
3896a51b8a
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue