Skip to content
Snippets Groups Projects
Commit fe27b61a authored by lain's avatar lain
Browse files

Add some debugging to federations.

parent 3d714f85
Branches
Tags
No related merge requests found
......@@ -53,10 +53,14 @@ defmodule Pleroma.Web.Websub do
Logger.debug(fn -> "Pushing to #{sub.callback}" end)
Task.start(fn ->
@httpoison.post(sub.callback, response, [
with {:ok, %{status_code: code}} <- @httpoison.post(sub.callback, response, [
{"Content-Type", "application/atom+xml"},
{"X-Hub-Signature", "sha1=#{signature}"}
])
]) do
Logger.debug(fn -> "Pushed to #{sub.callback}, code #{code}" end)
else e ->
Logger.debug(fn -> "Couldn't push to #{sub.callback}, #{inspect(e)}" end)
end
end)
end)
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment