diff --git a/lib/pleroma/web/websub/websub.ex b/lib/pleroma/web/websub/websub.ex index a683f6da4..12edf094c 100644 --- a/lib/pleroma/web/websub/websub.ex +++ b/lib/pleroma/web/websub/websub.ex @@ -53,10 +53,14 @@ def publish(topic, user, activity) 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