# only accept relayed Creates
def inbox(conn, %{"type" => "Create"} = params) do
- Logger.info(
+ Logger.debug(
"Signature missing or not from author, relayed Create message, fetching object from source"
)
headers = Enum.into(conn.req_headers, %{})
if String.contains?(headers["signature"], params["actor"]) do
- Logger.info(
+ Logger.debug(
"Signature validation error for: #{params["actor"]}, make sure you are forwarding the HTTP Host header!"
)
- Logger.info(inspect(conn.req_headers))
+ Logger.debug(inspect(conn.req_headers))
end
json(conn, dgettext("errors", "error"))
@impl true
def filter(object) do
- Logger.info("REJECTING #{inspect(object)}")
+ Logger.debug("REJECTING #{inspect(object)}")
{:reject, object}
end
]
def perform(:prefetch, url) do
- Logger.info("Prefetching #{inspect(url)}")
+ Logger.debug("Prefetching #{inspect(url)}")
url
|> MediaProxy.url()
public = is_public?(activity)
if public && Config.get([:instance, :allow_relay]) do
- Logger.info(fn -> "Relaying #{activity.data["id"]} out" end)
+ Logger.debug(fn -> "Relaying #{activity.data["id"]} out" end)
Relay.publish(activity)
end
end
def perform(:incoming_ap_doc, params) do
- Logger.info("Handling incoming AP activity")
+ Logger.debug("Handling incoming AP activity")
params = Utils.normalize_params(params)
{:ok, activity}
else
%Activity{} ->
- Logger.info("Already had #{params["id"]}")
+ Logger.debug("Already had #{params["id"]}")
:error
_e ->
# Just drop those for now
- Logger.info("Unhandled activity")
- Logger.info(Jason.encode!(params, pretty: true))
+ Logger.debug("Unhandled activity")
+ Logger.debug(Jason.encode!(params, pretty: true))
:error
end
end
Config.get([:instance, :federation_publisher_modules])
|> Enum.each(fn module ->
if module.is_representable?(activity) do
- Logger.info("Publishing #{activity.data["id"]} using #{inspect(module)}")
+ Logger.debug("Publishing #{activity.data["id"]} using #{inspect(module)}")
module.publish(user, activity)
end
end)