mix format

This commit is contained in:
FloatingGhost 2022-11-04 03:48:24 +00:00
parent 525434bc9c
commit 3d52295727
4 changed files with 18 additions and 14 deletions

View File

@ -240,19 +240,21 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do
%{}
end
instance = with {:ok, instance} <- Pleroma.Instances.Instance.get_cached_by_url(user.ap_id) do
instance
else
_ ->
instance =
with {:ok, instance} <- Pleroma.Instances.Instance.get_cached_by_url(user.ap_id) do
instance
else
_ ->
nil
end
end
favicon = if is_nil(instance) do
nil
else
instance.favicon
|> MediaProxy.url()
end
favicon =
if is_nil(instance) do
nil
else
instance.favicon
|> MediaProxy.url()
end
%{
id: to_string(user.id),

View File

@ -421,7 +421,6 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
nil
end
def render("history.json", %{activity: %{data: %{"object" => _object}} = activity} = opts) do
object = Object.normalize(activity, fetch: false)

View File

@ -41,7 +41,7 @@ defmodule Pleroma.Workers.WorkerHelper do
unquote(caller_module)
|> apply(:new, [params, worker_args])
|> Oban.insert()\
|> Oban.insert()
end
end
end

View File

@ -43,7 +43,10 @@ defmodule Pleroma.Web.ActivityPub.SideEffectsTest do
{:ok, _create_activity, _meta} =
SideEffects.handle(create_activity, local: false, object_data: note_data)
assert_enqueued(worker: Pleroma.Workers.NodeInfoFetcherWorker, args: %{"op" => "process", "source_url" => "https://wowee.example.com/users/1"})
assert_enqueued(
worker: Pleroma.Workers.NodeInfoFetcherWorker,
args: %{"op" => "process", "source_url" => "https://wowee.example.com/users/1"}
)
end
end