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 @@ defp do_render("show.json", %{user: user} = opts) 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 @@ def render("show.json", _) 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 @@ def enqueue(op, params, worker_args \\ []) do
unquote(caller_module)
|> apply(:new, [params, worker_args])
|> Oban.insert()\
|> Oban.insert()
end
end
end

View file

@ -43,7 +43,10 @@ test "it queues a fetch of instance information" 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