diff options
author | lain <lain@soykaf.club> | 2020-05-03 13:48:01 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-05-03 13:48:01 +0200 |
commit | a7966f2080a0e9b3c2b35efa7ea647c1bdef2a2d (patch) | |
tree | 09d5e1e071c6a3fcccf185f983910310fd981798 /lib/pleroma/web/web_finger | |
parent | 095635453ac58b9e01a32ad226c0b61466c16da0 (diff) | |
download | pleroma-a7966f2080a0e9b3c2b35efa7ea647c1bdef2a2d.tar.gz |
Webfinger: Request account info with the acct scheme
Diffstat (limited to 'lib/pleroma/web/web_finger')
-rw-r--r-- | lib/pleroma/web/web_finger/web_finger.ex | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/pleroma/web/web_finger/web_finger.ex b/lib/pleroma/web/web_finger/web_finger.ex index 7ffd0e51b..442b25165 100644 --- a/lib/pleroma/web/web_finger/web_finger.ex +++ b/lib/pleroma/web/web_finger/web_finger.ex @@ -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 <- |