Commit 8f9fbc86 authored by lain's avatar lain
Browse files

Transmogrifier: Small readability changes.

parent 54a6855d
Pipeline #29657 passed with stages
in 24 minutes and 51 seconds
......@@ -661,7 +661,8 @@ def handle_incoming(
)
when type in ~w{Update Block Follow} do
with {:ok, %User{}} <- ObjectValidator.fetch_actor(data),
{:ok, activity, _} <- Pipeline.common_pipeline(data, local: false) do
{:ok, activity, _} <-
Pipeline.common_pipeline(data, local: false) do
{:ok, activity}
end
end
......@@ -670,7 +671,8 @@ def handle_incoming(
%{"type" => "Delete"} = data,
_options
) do
with {:ok, activity, _} <- Pipeline.common_pipeline(data, local: false) do
with {:ok, activity, _} <-
Pipeline.common_pipeline(data, local: false) do
{:ok, activity}
else
{:error, {:validate_object, _}} = e ->
......
......@@ -130,7 +130,7 @@ test "it works for incoming unannounces with an existing notice" do
"http://mastodon.example.org/users/admin/statuses/99542391527669785/activity"
end
test "it works for incomming unfollows with an existing follow" do
test "it works for incoming unfollows with an existing follow" do
user = insert(:user)
follow_data =
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment