ChatOperation: Make simple schema into inline schema
[akkoma] / lib / pleroma / web / web_finger / web_finger.ex
index db567a02e0fbebf5832be41f03e8b371fd1522b9..7ffd0e51bbfbef242fddcb22bc97790cb00fd3a6 100644 (file)
@@ -173,7 +173,8 @@ defmodule Pleroma.Web.WebFinger do
       get_template_from_xml(body)
     else
       _ ->
-        with {:ok, %{body: body}} <- HTTP.get("https://#{domain}/.well-known/host-meta", []) do
+        with {:ok, %{body: body, status: status}} when status in 200..299 <-
+               HTTP.get("https://#{domain}/.well-known/host-meta", []) do
           get_template_from_xml(body)
         else
           e -> {:error, "Can't find LRDD template: #{inspect(e)}"}