combined outgoing_blocks with statement
authorsquidboi <squidboi@waifu.club>
Mon, 25 Jun 2018 06:05:44 +0000 (23:05 -0700)
committersquidboi <squidboi@waifu.club>
Mon, 25 Jun 2018 06:05:44 +0000 (23:05 -0700)
lib/pleroma/web/activity_pub/activity_pub.ex

index 513b53b30b47a103b075577f7a1ec29014a71d4c..e3ce5aa04fcb0dad3fb1fdb04b7d1578d38a0ea2 100644 (file)
@@ -255,12 +255,11 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
       end
     end
 
-    with true <- outgoing_blocks do
-      with block_data <- make_block_data(blocker, blocked, activity_id),
-           {:ok, activity} <- insert(block_data, local),
-           :ok <- maybe_federate(activity) do
-        {:ok, activity}
-      end
+    with true <- outgoing_blocks,
+         block_data <- make_block_data(blocker, blocked, activity_id),
+         {:ok, activity} <- insert(block_data, local),
+         :ok <- maybe_federate(activity) do
+      {:ok, activity}
     else
       _e -> {:ok, nil}
     end