From: squidboi Date: Mon, 25 Jun 2018 06:05:44 +0000 (-0700) Subject: combined outgoing_blocks with statement X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=ea214b8ba65c0911aed6d2b019465272fc77fbc4;p=akkoma combined outgoing_blocks with statement --- diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex index 513b53b30..e3ce5aa04 100644 --- a/lib/pleroma/web/activity_pub/activity_pub.ex +++ b/lib/pleroma/web/activity_pub/activity_pub.ex @@ -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