Browse Source

Add some debugging to federations.

tags/v0.9.9
Roger Braun 7 years ago
parent
commit
fe27b61a72
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      lib/pleroma/web/websub/websub.ex

+ 6
- 2
lib/pleroma/web/websub/websub.ex View File

@@ -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


Loading…
Cancel
Save