Webfinger: Request account info with the acct scheme

This commit is contained in:
lain 2020-05-03 13:48:01 +02:00
commit a7966f2080
2 changed files with 11 additions and 9 deletions

View file

@ -194,13 +194,15 @@ defmodule Pleroma.Web.WebFinger do
URI.parse(account).host
end
encoded_account = URI.encode("acct:#{account}")
address =
case find_lrdd_template(domain) do
{:ok, template} ->
String.replace(template, "{uri}", URI.encode(account))
String.replace(template, "{uri}", encoded_account)
_ ->
"https://#{domain}/.well-known/webfinger?resource=acct:#{account}"
"https://#{domain}/.well-known/webfinger?resource=#{encoded_account}"
end
with response <-