Remove useless with clause
authorrinpatch <rinpatch@sdf.org>
Wed, 25 Sep 2019 13:26:47 +0000 (16:26 +0300)
committerrinpatch <rinpatch@sdf.org>
Wed, 25 Sep 2019 13:26:47 +0000 (16:26 +0300)
lib/pleroma/web/activity_pub/activity_pub_controller.ex

index aa16200097224e1b7ae42810a8c0518b864f649a..60abe1e1dca0138327823a26bbab44669b3ad014 100644 (file)
@@ -348,23 +348,23 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubController do
         %{"nickname" => nickname, "page" => page?} = params
       )
       when page? in [true, "true"] do
-    with activities <-
-           (if params["max_id"] do
-              ActivityPub.fetch_activities([user.ap_id | user.following], %{
-                "max_id" => params["max_id"],
-                "limit" => 10
-              })
-            else
-              ActivityPub.fetch_activities([user.ap_id | user.following], %{"limit" => 10})
-            end) do
-      conn
-      |> put_resp_content_type("application/activity+json")
-      |> put_view(UserView)
-      |> render("activity_collection_page.json", %{
-        activities: activities,
-        iri: "#{user.ap_id}/inbox"
-      })
-    end
+    activities =
+      if params["max_id"] do
+        ActivityPub.fetch_activities([user.ap_id | user.following], %{
+          "max_id" => params["max_id"],
+          "limit" => 10
+        })
+      else
+        ActivityPub.fetch_activities([user.ap_id | user.following], %{"limit" => 10})
+      end
+
+    conn
+    |> put_resp_content_type("application/activity+json")
+    |> put_view(UserView)
+    |> render("activity_collection_page.json", %{
+      activities: activities,
+      iri: "#{user.ap_id}/inbox"
+    })
   end
 
   def read_inbox(%{assigns: %{user: %{nickname: nickname} = user}} = conn, %{