Commit 9d304ec50de621ffbd8ec6809e50aa86789b42b9

Authored by Nikita Fedyashev
1 parent 88004758
Exists in master and in 1 other branch production

Add Flowdock configuration option

app/models/notification_services/flowdock_service.rb
... ... @@ -21,7 +21,7 @@ if defined? Flowdock
21 21 end
22 22  
23 23 def create_notification(problem)
24   - flow = Flowdock::Flow.new(:api_token => api_token, :source => "Errbit", :from => {:name => "Errbit", :address => 'support@flowdock.com'})
  24 + flow = Flowdock::Flow.new(:api_token => api_token, :source => "Errbit", :from => {:name => "Errbit", :address => ENV['ERRBIT_EMAIL_FROM'] || 'support@flowdock.com'})
25 25 subject = "[#{problem.environment}] #{problem.message.to_s.truncate(100)}"
26 26 url = app_problem_url problem.app, problem
27 27 flow.push_to_team_inbox(:subject => subject, :content => content(problem, url), :project => project_name(problem), :link => url)
... ...
docs/ENV-VARIABLES.md
... ... @@ -69,3 +69,9 @@ variable.
69 69 * MONGOID_PASSWORD
70 70 * MONGOID_DATABASE
71 71  
  72 +## Flowdock notification adapter
  73 +
  74 +If you noticed default Gravatar icon in your Flowdock notifications you
  75 +may want to [add Errbit icon](http://gravatar.com) for email that is
  76 +set in ERRBIT_EMAIL_FROM.
  77 +You don't need to approve or authorize it on Flowdock because it is used only for an icon.
... ...