def inbox(conn, params) do
headers = Enum.into(conn.req_headers, %{})
if !(String.contains?(headers["signature"] || "", params["actor"])) do
- Logger.info("Signature not from author, relayed message, ignoring.")
+ Logger.info("Signature not from author, relayed message, ignoring")
else
- Logger.info("Signature error.")
+ Logger.info("Signature error")
Logger.info("Could not validate #{params["actor"]}")
Logger.info(inspect(conn.req_headers))
end
if validate_conn(conn, public_key) do
true
else
- Logger.debug("Could not validate, re-fetching user and trying one more time.")
+ Logger.debug("Could not validate, re-fetching user and trying one more time")
# Fetch user anew and try one more time
with actor_id <- conn.params["actor"],
{:ok, _user} <- ActivityPub.make_user_from_ap_id(actor_id),
{:ok, data}
else
e ->
- Logger.debug(fn -> "Couldn't finger #{account}." end)
+ Logger.debug(fn -> "Couldn't finger #{account}" end)
Logger.debug(fn -> inspect(e) end)
{:error, e}
end
{:ok, websub}
else {:error, reason} ->
- Logger.debug("Couldn't create subscription.")
+ Logger.debug("Couldn't create subscription")
Logger.debug(inspect(reason))
{:error, reason}