projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3d714f8
)
Add some debugging to federations.
author
Roger Braun
<roger@rogerbraun.net>
Tue, 20 Jun 2017 12:10:44 +0000
(14:10 +0200)
committer
Roger Braun
<roger@rogerbraun.net>
Tue, 20 Jun 2017 12:10:44 +0000
(14:10 +0200)
lib/pleroma/web/websub/websub.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/web/websub/websub.ex
b/lib/pleroma/web/websub/websub.ex
index a683f6da40de022e443630f8adb279471f019431..12edf094cce4c38b6e46cc6195702e107b7c1157 100644
(file)
--- a/
lib/pleroma/web/websub/websub.ex
+++ b/
lib/pleroma/web/websub/websub.ex
@@
-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