mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-19 11:45:01 +00:00
More logging.
This commit is contained in:
parent
eb3f14da86
commit
2583a9f6e8
2 changed files with 16 additions and 8 deletions
|
@ -288,6 +288,8 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
|
||||||
}
|
}
|
||||||
|
|
||||||
{:ok, user_data}
|
{:ok, user_data}
|
||||||
|
else
|
||||||
|
e -> Logger.error("Could not user at fetch #{ap_id}, #{inspect(e)}")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -357,7 +359,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
|
||||||
Logger.info("Couldn't get object via AP, trying out OStatus fetching...")
|
Logger.info("Couldn't get object via AP, trying out OStatus fetching...")
|
||||||
case OStatus.fetch_activity_from_url(id) do
|
case OStatus.fetch_activity_from_url(id) do
|
||||||
{:ok, [activity | _]} -> {:ok, Object.get_by_ap_id(activity.data["object"]["id"])}
|
{:ok, [activity | _]} -> {:ok, Object.get_by_ap_id(activity.data["object"]["id"])}
|
||||||
_ -> e
|
e -> e
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -292,7 +292,10 @@ defmodule Pleroma.Web.OStatus do
|
||||||
with {:ok, %{body: body, status_code: code}} when code in 200..299 <- @httpoison.get(url, [Accept: "application/atom+xml"], follow_redirect: true, timeout: 10000, recv_timeout: 20000) do
|
with {:ok, %{body: body, status_code: code}} when code in 200..299 <- @httpoison.get(url, [Accept: "application/atom+xml"], follow_redirect: true, timeout: 10000, recv_timeout: 20000) do
|
||||||
Logger.debug("Got document from #{url}, handling...")
|
Logger.debug("Got document from #{url}, handling...")
|
||||||
handle_incoming(body)
|
handle_incoming(body)
|
||||||
else e -> Logger.debug("Couldn't get #{url}: #{inspect(e)}")
|
else
|
||||||
|
e ->
|
||||||
|
Logger.debug("Couldn't get #{url}: #{inspect(e)}")
|
||||||
|
e
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -301,7 +304,10 @@ defmodule Pleroma.Web.OStatus do
|
||||||
with {:ok, %{body: body}} <- @httpoison.get(url, [], follow_redirect: true, timeout: 10000, recv_timeout: 20000),
|
with {:ok, %{body: body}} <- @httpoison.get(url, [], follow_redirect: true, timeout: 10000, recv_timeout: 20000),
|
||||||
{:ok, atom_url} <- get_atom_url(body) do
|
{:ok, atom_url} <- get_atom_url(body) do
|
||||||
fetch_activity_from_atom_url(atom_url)
|
fetch_activity_from_atom_url(atom_url)
|
||||||
else e -> Logger.debug("Couldn't get #{url}: #{inspect(e)}")
|
else
|
||||||
|
e ->
|
||||||
|
Logger.debug("Couldn't get #{url}: #{inspect(e)}")
|
||||||
|
e
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue