Commit c8853320 authored by kaniini's avatar kaniini
Browse files

activitypub: user fetching: use fetch_and_contain_remote_object_from_id()

parent 1a940cb4
Pipeline #4542 passed with stages
in 6 minutes and 56 seconds
......@@ -628,9 +628,7 @@ def user_data_from_user_object(data) do
def fetch_and_prepare_user_from_ap_id(ap_id) do
with {:ok, %{status_code: 200, body: body}} <-
@httpoison.get(ap_id, [Accept: "application/activity+json"], follow_redirect: true),
{:ok, data} <- Jason.decode(body) do
with {:ok, data} <- fetch_and_contain_remote_object_from_id(ap_id) do
e -> Logger.error("Could not decode user at fetch #{ap_id}, #{inspect(e)}")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment