mentioning fixes

This commit is contained in:
jomo
2014-07-06 05:07:30 +02:00
parent b1d797ce06
commit d385136114
5 changed files with 5 additions and 6 deletions

View File

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

View File

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

View File

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

View File

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

View File

@@ -37,8 +37,7 @@
</tr> </tr>
<tr> <tr>
<td> <td>
mentions me in a thread or comment<br> mentions me in a thread or comment
<i>(Not yet implemented)</i>
</td> </td>
<td> <td>
<%= f.check_box :mail_mention %> <%= f.check_box :mail_mention %>