Apply formatting
This commit is contained in:
parent
5967b30bb1
commit
f6800665e7
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user