From f6800665e76b86992983cfe99b943ef5fa6bf4af Mon Sep 17 00:00:00 2001 From: miffigriffy Date: Fri, 13 Sep 2019 02:28:09 +0200 Subject: [PATCH] Apply formatting --- lib/mobilizon/actors/actor.ex | 10 ++++++++-- ...0151607_split_event_visibility_and_join_options.exs | 4 ++-- .../service/activity_pub/transmogrifier_test.exs | 3 +-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/mobilizon/actors/actor.ex b/lib/mobilizon/actors/actor.ex index 4dd5a1d38..5e7add0d5 100644 --- a/lib/mobilizon/actors/actor.ex +++ b/lib/mobilizon/actors/actor.ex @@ -180,11 +180,17 @@ defmodule Mobilizon.Actors.Actor do a distant actor. """ @spec preferred_username_and_domain(t) :: String.t() - def preferred_username_and_domain(%__MODULE__{preferred_username: preferred_username, domain: nil}) do + def preferred_username_and_domain(%__MODULE__{ + preferred_username: preferred_username, + domain: nil + }) do preferred_username end - def preferred_username_and_domain(%__MODULE__{preferred_username: preferred_username, domain: domain}) do + def preferred_username_and_domain(%__MODULE__{ + preferred_username: preferred_username, + domain: domain + }) do "#{preferred_username}@#{domain}" end diff --git a/priv/repo/migrations/20190130151607_split_event_visibility_and_join_options.exs b/priv/repo/migrations/20190130151607_split_event_visibility_and_join_options.exs index ecf464a9c..0255ea2af 100644 --- a/priv/repo/migrations/20190130151607_split_event_visibility_and_join_options.exs +++ b/priv/repo/migrations/20190130151607_split_event_visibility_and_join_options.exs @@ -14,7 +14,7 @@ defmodule Mobilizon.Repo.Migrations.SplitEventVisibilityAndJoinOptions do EventVisibility.create_type() execute( - "ALTER TABLE events ALTER COLUMN visibility TYPE event_visibility_type USING visibility::event_visibility" + "ALTER TABLE events ALTER COLUMN visibility TYPE event_visibility USING visibility::event_visibility" ) JoinOptions.create_type() @@ -42,7 +42,7 @@ defmodule Mobilizon.Repo.Migrations.SplitEventVisibilityAndJoinOptions do EventVisibility.create_type() execute( - "ALTER TABLE events ALTER COLUMN visibility TYPE event_visibility_type USING visibility::event_visibility" + "ALTER TABLE events ALTER COLUMN visibility TYPE event_visibility USING visibility::event_visibility" ) end end diff --git a/test/mobilizon/service/activity_pub/transmogrifier_test.exs b/test/mobilizon/service/activity_pub/transmogrifier_test.exs index 91ec98007..4db06e085 100644 --- a/test/mobilizon/service/activity_pub/transmogrifier_test.exs +++ b/test/mobilizon/service/activity_pub/transmogrifier_test.exs @@ -115,8 +115,7 @@ defmodule Mobilizon.Service.ActivityPub.TransmogrifierTest do test "it works for incoming notices" do data = File.read!("test/fixtures/mastodon-post-activity.json") |> Jason.decode!() - {:ok, %Activity{data: data, local: false}, _} = - Transmogrifier.handle_incoming(data) + {:ok, %Activity{data: data, local: false}, _} = Transmogrifier.handle_incoming(data) assert data["id"] == "https://framapiaf.org/users/admin/statuses/99512778738411822/activity"