Commit 317f57c3fdf6cd7ebbde4bdd65ce1185cf834de7
Exists in
master
and in
1 other branch
Merge pull request #530 from nfedyashev/flowdock_improvement
Add Flowdock configuration option
Showing
2 changed files
with
7 additions
and
1 deletions
Show diff stats
app/models/notification_services/flowdock_service.rb
@@ -21,7 +21,7 @@ if defined? Flowdock | @@ -21,7 +21,7 @@ if defined? Flowdock | ||
21 | end | 21 | end |
22 | 22 | ||
23 | def create_notification(problem) | 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 | subject = "[#{problem.environment}] #{problem.message.to_s.truncate(100)}" | 25 | subject = "[#{problem.environment}] #{problem.message.to_s.truncate(100)}" |
26 | url = app_problem_url problem.app, problem | 26 | url = app_problem_url problem.app, problem |
27 | flow.push_to_team_inbox(:subject => subject, :content => content(problem, url), :project => project_name(problem), :link => url) | 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,3 +69,9 @@ variable. | ||
69 | * MONGOID_PASSWORD | 69 | * MONGOID_PASSWORD |
70 | * MONGOID_DATABASE | 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. |