activitypub: clean up logging statements a little
This commit is contained in:
parent
1d17082ab2
commit
56862f4ce1
@ -818,8 +818,6 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
|
|||||||
if object = Object.get_cached_by_ap_id(id) do
|
if object = Object.get_cached_by_ap_id(id) do
|
||||||
{:ok, object}
|
{:ok, object}
|
||||||
else
|
else
|
||||||
Logger.info("Fetching #{id} via AP")
|
|
||||||
|
|
||||||
with {:ok, data} <- fetch_and_contain_remote_object_from_id(id),
|
with {:ok, data} <- fetch_and_contain_remote_object_from_id(id),
|
||||||
nil <- Object.normalize(data),
|
nil <- Object.normalize(data),
|
||||||
params <- %{
|
params <- %{
|
||||||
@ -851,7 +849,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
|
|||||||
end
|
end
|
||||||
|
|
||||||
def fetch_and_contain_remote_object_from_id(id) do
|
def fetch_and_contain_remote_object_from_id(id) do
|
||||||
Logger.info("Fetching #{id} via AP")
|
Logger.info("Fetching object #{id} via AP")
|
||||||
|
|
||||||
with true <- String.starts_with?(id, "http"),
|
with true <- String.starts_with?(id, "http"),
|
||||||
{:ok, %{body: body, status: code}} when code in 200..299 <-
|
{:ok, %{body: body, status: code}} when code in 200..299 <-
|
||||||
|
Loading…
Reference in New Issue
Block a user