diff options
author | Roger Braun <roger@rogerbraun.net> | 2017-06-23 16:22:19 +0200 |
---|---|---|
committer | Roger Braun <roger@rogerbraun.net> | 2017-06-23 16:22:19 +0200 |
commit | 6ee0ca21e2f449e9bf8ef36d37233081ea981b32 (patch) | |
tree | 6e47c386f4a5041a6bc025204c14c60084567fb1 /lib | |
parent | 4ba6746820f3633cad91485d19100b120fef519b (diff) | |
download | pleroma-6ee0ca21e2f449e9bf8ef36d37233081ea981b32.tar.gz |
Some salmon debug fixes.
Plus httpoison update.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/salmon/salmon.ex | 6 |
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 |