Commit 18e3662d16debf1c8c0b99f5e3465ebd2e233f31:
cc board@ and dedup @apache.org
Branch: refs/heads/master
Author: Sam Ruby <[email protected]>
Committer: Sam Ruby <[email protected]>
Pusher: rubys <[email protected]>
------------------------------------------------------------
www/board/agenda/views/actions/feedback.json.rb | +++++++ ----
------------------------------------------------------------
22 changes: 14 additions, 8 deletions.
------------------------------------------------------------
diff --git a/www/board/agenda/views/actions/feedback.json.rb
b/www/board/agenda/views/actions/feedback.json.rb
index d8c45b3..11f3738 100644
--- a/www/board/agenda/views/actions/feedback.json.rb
+++ b/www/board/agenda/views/actions/feedback.json.rb
@@ -45,20 +45,26 @@
next if text.strip.empty?
+ # build cc list
+ cc = ['[email protected]']
+
+ if item['mail_list']
+ if item[:attach] =~ /^[A-Z]+/
+ cc << "private@#{item['mail_list']}.apache.org".untaint
+ elsif item['mail_list'].include? '@'
+ cc << item['mail_list'].untaint
+ else
+ cc << "#{item['mail_list']}@apache.org".untaint
+ end
+ end
+
# construct email
mail = Mail.new do
from from
to "#{item['owner']} <#{item['chair_email']}>".untaint
+ cc cc
subject "Board feedback on #{date} #{item['title']} report"
- if item['mail_list']
- if item[:attach] =~ /^[A-Z]+/
- cc "private@#{item['mail_list']}.apache.org".untaint
- else
- cc "#{item['mail_list']}@apache.org".untaint
- end
- end
-
body text.strip.untaint
end