Add some debugging to federations.

This commit is contained in:
Roger Braun 2017-06-20 14:10:44 +02:00
parent 3d714f85a8
commit fe27b61a72

View File

@ -53,10 +53,14 @@ defmodule Pleroma.Web.Websub do
Logger.debug(fn -> "Pushing to #{sub.callback}" end) Logger.debug(fn -> "Pushing to #{sub.callback}" end)
Task.start(fn -> Task.start(fn ->
@httpoison.post(sub.callback, response, [ with {:ok, %{status_code: code}} <- @httpoison.post(sub.callback, response, [
{"Content-Type", "application/atom+xml"}, {"Content-Type", "application/atom+xml"},
{"X-Hub-Signature", "sha1=#{signature}"} {"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) end)
end end