mentioning fixes
This commit is contained in:
@@ -31,7 +31,7 @@ class Blogpost < ActiveRecord::Base
|
||||
mails = []
|
||||
new_mentions.each do |user|
|
||||
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
|
||||
Rails.logger.error "---"
|
||||
Rails.logger.error "WARNING: Failed to create new_post_mention_mail (view) for post#: #{@self.id}, user: #{@user.name}, #{@user.email}"
|
||||
|
||||
@@ -63,7 +63,7 @@ class Comment < ActiveRecord::Base
|
||||
mails = []
|
||||
new_mentions.each do |user|
|
||||
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
|
||||
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}"
|
||||
|
||||
@@ -47,7 +47,7 @@ class Forumthread < ActiveRecord::Base
|
||||
mails = []
|
||||
new_mentions.each do |user|
|
||||
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
|
||||
Rails.logger.error "---"
|
||||
Rails.logger.error "WARNING: Failed to create new_thread_mention_mail (view) for reply#: #{@self.id}, user: #{@user.name}, #{@user.email}"
|
||||
|
||||
@@ -38,7 +38,7 @@ class Threadreply < ActiveRecord::Base
|
||||
mails = []
|
||||
new_mentions.each do |user|
|
||||
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
|
||||
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}"
|
||||
|
||||
@@ -37,8 +37,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
mentions me in a thread or comment<br>
|
||||
<i>(Not yet implemented)</i>
|
||||
mentions me in a thread or comment
|
||||
</td>
|
||||
<td>
|
||||
<%= f.check_box :mail_mention %>
|
||||
|
||||
Reference in New Issue
Block a user