projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Polish IdempotencyPlug
[akkoma]
/
lib
/
pleroma
/
web
/
web_finger
/
web_finger.ex
diff --git
a/lib/pleroma/web/web_finger/web_finger.ex
b/lib/pleroma/web/web_finger/web_finger.ex
index c5b7d4acb1a59fcb59a9e1edef95a7c91888a04e..3fca72de84f9806eddf5547638a2503a46390fc1 100644
(file)
--- a/
lib/pleroma/web/web_finger/web_finger.ex
+++ b/
lib/pleroma/web/web_finger/web_finger.ex
@@
-3,8
+3,7
@@
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.WebFinger do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.WebFinger do
- @httpoison Application.get_env(:pleroma, :httpoison)
-
+ alias Pleroma.HTTP
alias Pleroma.User
alias Pleroma.Web
alias Pleroma.Web.Federator.Publisher
alias Pleroma.User
alias Pleroma.Web
alias Pleroma.Web.Federator.Publisher
@@
-176,11
+175,11
@@
defmodule Pleroma.Web.WebFinger do
def find_lrdd_template(domain) do
with {:ok, %{status: status, body: body}} when status in 200..299 <-
def find_lrdd_template(domain) do
with {:ok, %{status: status, body: body}} when status in 200..299 <-
-
@httpoison
.get("http://#{domain}/.well-known/host-meta", []) do
+
HTTP
.get("http://#{domain}/.well-known/host-meta", []) do
get_template_from_xml(body)
else
_ ->
get_template_from_xml(body)
else
_ ->
- with {:ok, %{body: body}} <-
@httpoison
.get("https://#{domain}/.well-known/host-meta", []) do
+ with {:ok, %{body: body}} <-
HTTP
.get("https://#{domain}/.well-known/host-meta", []) do
get_template_from_xml(body)
else
e -> {:error, "Can't find LRDD template: #{inspect(e)}"}
get_template_from_xml(body)
else
e -> {:error, "Can't find LRDD template: #{inspect(e)}"}
@@
-209,7
+208,7
@@
defmodule Pleroma.Web.WebFinger do
end
with response <-
end
with response <-
-
@httpoison
.get(
+
HTTP
.get(
address,
Accept: "application/xrd+xml,application/jrd+json"
),
address,
Accept: "application/xrd+xml,application/jrd+json"
),