Mix format

This commit is contained in:
FloatingGhost 2023-08-16 00:35:08 +01:00
parent 94d1af2c4c
commit 98a64ab145
2 changed files with 6 additions and 3 deletions

View file

@ -115,7 +115,7 @@ defmodule Pleroma.Web.ActivityPub.Publisher do
def should_federate?(url) do def should_federate?(url) do
%{host: host} = URI.parse(url) %{host: host} = URI.parse(url)
with {:nil, false} <- {:nil, is_nil(host)}, with {nil, false} <- {nil, is_nil(host)},
allowed <- allowed_instances(), allowed <- allowed_instances(),
false <- Enum.empty?(allowed) do false <- Enum.empty?(allowed) do
allowed allowed
@ -124,8 +124,9 @@ defmodule Pleroma.Web.ActivityPub.Publisher do
|> Pleroma.Web.ActivityPub.MRF.subdomain_match?(host) |> Pleroma.Web.ActivityPub.MRF.subdomain_match?(host)
else else
# oi! # oi!
{:nil, true} -> {nil, true} ->
false false
_ -> _ ->
quarantined_instances = quarantined_instances =
blocked_instances() blocked_instances()

View file

@ -34,7 +34,9 @@ defmodule Pleroma.Web.Plugs.OAuthScopesPlug do
permissions = Enum.join(missing_scopes, " #{op} ") permissions = Enum.join(missing_scopes, " #{op} ")
error_message = error_message =
dgettext("errors", "Insufficient permissions: %{permissions}.", permissions: permissions) dgettext("errors", "Insufficient permissions: %{permissions}.",
permissions: permissions
)
conn conn
|> put_resp_content_type("application/json") |> put_resp_content_type("application/json")