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