diff options
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 |