combined outgoing_blocks with statement
This commit is contained in:
parent
c4038ede07
commit
ea214b8ba6
|
@ -255,12 +255,11 @@ def block(blocker, blocked, activity_id \\ nil, local \\ true) do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
with true <- outgoing_blocks do
|
with true <- outgoing_blocks,
|
||||||
with block_data <- make_block_data(blocker, blocked, activity_id),
|
block_data <- make_block_data(blocker, blocked, activity_id),
|
||||||
{:ok, activity} <- insert(block_data, local),
|
{:ok, activity} <- insert(block_data, local),
|
||||||
:ok <- maybe_federate(activity) do
|
:ok <- maybe_federate(activity) do
|
||||||
{:ok, activity}
|
{:ok, activity}
|
||||||
end
|
|
||||||
else
|
else
|
||||||
_e -> {:ok, nil}
|
_e -> {:ok, nil}
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue