Merge 2023.04 stable release #7

Merged
fedward merged 50 commits from AkkomaGang/akkoma:stable into stable 2023-04-16 18:12:17 +00:00
2 changed files with 2 additions and 3 deletions
Showing only changes of commit 1b2c24a19e - Show all commits

View file

@ -50,7 +50,6 @@ def init(opts) do
end
def call(conn, opts) do
IO.inspect("OPTS: #{inspect(opts)}")
with false <- api_route?(conn.path_info),
false <- invalid_path?(conn.path_info),
true <- enabled?(opts[:if]),
@ -83,7 +82,7 @@ def preferred_or_fallback(conn, :primary) do
end
end
def preferred_or_fallback(conn, fallback), do: fallback
def preferred_or_fallback(_conn, fallback), do: fallback
defp enabled?(if_opt) when is_function(if_opt), do: if_opt.()
defp enabled?(true), do: true
@ -106,7 +105,6 @@ defp api_route?([h | t]) do
defp call_static(conn, opts, from) do
opts = Map.put(opts, :from, from)
IO.inspect(opts, label: "opts")
Plug.Static.call(conn, opts)
end
end

View file

@ -83,6 +83,7 @@ test "api routes are detected correctly" do
"main",
"ostatus_subscribe",
"oauth",
"akkoma",
"objects",
"activities",
"notice",