mentioning fixes
This commit is contained in:
@@ -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}"
|
||||||
|
|||||||
@@ -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}"
|
||||||
|
|||||||
@@ -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}"
|
||||||
|
|||||||
@@ -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}"
|
||||||
|
|||||||
@@ -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 %>
|
||||||
|
|||||||
Reference in New Issue
Block a user