Skip to content

Commit

Permalink
Fixing slack integration
Browse files Browse the repository at this point in the history
28e1148 changed SlackService notifier to rely only on the service_url, and no longer needing an api_token

This apparently broke the form for any newly created app, because a notifier was only considered `configured?` if the api_token was set, which is now impossible to do for slack

I wasn't really sure how to go about this, because I'm not very familiar with the codebase yet, but I just thought I'd push the fix I've made on my fork so this can be properly discussed
  • Loading branch information
naps62 committed Mar 16, 2015
1 parent 6cf43dc commit f3b1aba
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/models/notification_services/slack_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,8 @@ def post_payload(problem)
def create_notification(problem)
HTTParty.post(service_url, :body => post_payload(problem), :headers => { 'Content-Type' => 'application/json' })
end

def configured?
service_url.present?
end
end

0 comments on commit f3b1aba

Please sign in to comment.