aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRoger Braun <roger@rogerbraun.net>2017-06-23 16:22:19 +0200
committerRoger Braun <roger@rogerbraun.net>2017-06-23 16:22:19 +0200
commit6ee0ca21e2f449e9bf8ef36d37233081ea981b32 (patch)
tree6e47c386f4a5041a6bc025204c14c60084567fb1 /lib
parent4ba6746820f3633cad91485d19100b120fef519b (diff)
downloadpleroma-6ee0ca21e2f449e9bf8ef36d37233081ea981b32.tar.gz
Some salmon debug fixes.
Plus httpoison update.
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/salmon/salmon.ex6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/pleroma/web/salmon/salmon.ex b/lib/pleroma/web/salmon/salmon.ex
index 3f1d58de0..eadf0773b 100644
--- a/lib/pleroma/web/salmon/salmon.ex
+++ b/lib/pleroma/web/salmon/salmon.ex
@@ -132,7 +132,11 @@ defmodule Pleroma.Web.Salmon do
end
defp send_to_user(%{info: %{"salmon" => salmon}}, feed, poster) do
- poster.(salmon, feed, [{"Content-Type", "application/magic-envelope+xml"}], timeout: 10000, recv_timeout: 20000)
+ with {:ok, %{status_code: code}} <- poster.(salmon, feed, [{"Content-Type", "application/magic-envelope+xml"}], timeout: 10000, recv_timeout: 20000) do
+ Logger.debug(fn -> "Pushed to #{salmon}, code #{code}" end)
+ else
+ e -> Logger.debug(fn -> "Pushing salmon to #{salmon} failed, #{inspect(e)}" end)
+ end
end
defp send_to_user(_,_,_), do: nil