Business intelligence made simple
Prefer webhook url if set
Andrew Kane389dffe96124
diff --git a/lib/blazer/slack_notifier.rb b/lib/blazer/slack_notifier.rbindex 884077d7..2c63fa8d 100644--- a/lib/blazer/slack_notifier.rb+++ b/lib/blazer/slack_notifier.rb@@ -68,14 +68,14 @@ module Blazerenddef self.post(payload)- if Blazer.slack_oauth_token+ if Blazer.slack_webhook_url+ post_api(Blazer.slack_webhook_url, payload, {})+ elseheaders = {"Authorization" => "Bearer #{Blazer.slack_oauth_token}","Content-type" => "application/json"}post_api("https://slack.com/api/chat.postMessage", payload, headers)- else- post_api(Blazer.slack_webhook_url, payload, {})endend