From: rinpatch Date: Fri, 13 Sep 2019 10:09:56 +0000 (+0000) Subject: Apply suggestion to lib/pleroma/web/activity_pub/activity_pub_controller.ex X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=3896a51b8aefe6fe54251ffd559c636980faa87e;p=akkoma Apply suggestion to lib/pleroma/web/activity_pub/activity_pub_controller.ex --- diff --git a/lib/pleroma/web/activity_pub/activity_pub_controller.ex b/lib/pleroma/web/activity_pub/activity_pub_controller.ex index 025641722..4bd13defb 100644 --- a/lib/pleroma/web/activity_pub/activity_pub_controller.ex +++ b/lib/pleroma/web/activity_pub/activity_pub_controller.ex @@ -72,9 +72,8 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubController 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