帖子的邮件通知改成只有版主收到

Signed-off-by: alan <547533434@qq.com>
This commit is contained in:
alan 2015-02-02 17:31:27 +08:00
parent 646678c9db
commit 44c783a61b
1 changed files with 9 additions and 9 deletions

View File

@ -50,15 +50,15 @@ class Mailer < ActionMailer::Base
@forum_url = url_for(:controller => 'forums', :action => 'show', :id => @forum.id)
@issue_author_url = url_for(user_activities_url(@author))
recipients ||= []
if !memo.parent_id.nil?
mems = memo.self_and_siblings
mems.each do |mem|
recipients << mem.author.mail unless recipients.include? mem.author.mail
end
else
recipients << memo.author.mail
end
recipients << @author.mail unless recipients.include? @author.mail
# if !memo.parent_id.nil?
# mems = memo.self_and_siblings
# mems.each do |mem|
# recipients << mem.author.mail unless recipients.include? mem.author.mail
# end
# else
# recipients << memo.author.mail
# end
recipients << @author.mail
# cc = wiki_content.page.wiki.watcher_recipients - recipients
@memo_url = url_for(forum_memo_url(@forum, (@memo.parent_id.nil? ? @memo : @memo.parent_id)))