From ea214b8ba65c0911aed6d2b019465272fc77fbc4 Mon Sep 17 00:00:00 2001 From: squidboi Date: Sun, 24 Jun 2018 23:05:44 -0700 Subject: [PATCH] combined outgoing_blocks with statement --- lib/pleroma/web/activity_pub/activity_pub.ex | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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 -- 2.45.2