ActivityPub: follow redirects when fetching user
This commit is contained in:
parent
8c0c930041
commit
51a21284c6
|
@ -565,7 +565,7 @@ def user_data_from_user_object(data) do
|
||||||
|
|
||||||
def fetch_and_prepare_user_from_ap_id(ap_id) do
|
def fetch_and_prepare_user_from_ap_id(ap_id) do
|
||||||
with {:ok, %{status_code: 200, body: body}} <-
|
with {:ok, %{status_code: 200, body: body}} <-
|
||||||
@httpoison.get(ap_id, Accept: "application/activity+json"),
|
@httpoison.get(ap_id, [Accept: "application/activity+json"], follow_redirect: true),
|
||||||
{:ok, data} <- Jason.decode(body) do
|
{:ok, data} <- Jason.decode(body) do
|
||||||
user_data_from_user_object(data)
|
user_data_from_user_object(data)
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue