fix t/235: mentioned users see thread parts in email

This commit is contained in:
jomo
2014-09-25 23:30:10 +02:00
parent b94c3e89fa
commit c61dbb0798
2 changed files with 2 additions and 2 deletions

View File

@@ -47,7 +47,7 @@ class Forumthread < ActiveRecord::Base
mails = []
new_mentions.each do |user|
begin
mails << RedstonerMailer.new_thread_mention_mail(user, self) if user.normal? && user.confirmed? && user.mail_mention?
mails << RedstonerMailer.new_thread_mention_mail(user, self) if user.normal? && user.confirmed? && self.can_read?(user) && user.mail_mention?
rescue => e
Rails.logger.error "---"
Rails.logger.error "WARNING: Failed to create new_thread_mention_mail (view) for reply#: #{@self.id}, user: #{@user.name}, #{@user.email}"