@@ -80,8 +80,9 @@ defmodule Eventos.Service.WebFinger do
|
||||
|
||||
address = "http://#{domain}/.well-known/webfinger?resource=acct:#{actor}"
|
||||
|
||||
with response <- HTTPoison.get(address, [Accept: "application/json"],follow_redirect: true),
|
||||
{:ok, %{status_code: status_code, body: body}} when status_code in 200..299 <- response do
|
||||
Logger.debug(inspect address)
|
||||
with response <- HTTPoison.get!(address, [Accept: "application/json, application/activity+json, application/jrd+json"],follow_redirect: true),
|
||||
%{status_code: status_code, body: body} when status_code in 200..299 <- response do
|
||||
{:ok, doc} = Jason.decode(body)
|
||||
webfinger_from_json(doc)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user