Merge pull request #3252 from evazion/fix-2736

Fix #2736: Comment mention dmail didn't go through
This commit is contained in:
Albert Yi
2017-08-07 16:05:05 -07:00
committed by GitHub
5 changed files with 31 additions and 10 deletions

View File

@@ -22,7 +22,6 @@ class Comment < ApplicationRecord
attr_accessible :is_sticky, :as => [:moderator, :admin]
mentionable(
:message_field => :body,
:user_field => :creator_id,
:title => lambda {|user_name| "#{creator_name} mentioned you in a comment on post ##{post_id}"},
:body => lambda {|user_name| "@#{creator_name} mentioned you in a \"comment\":/posts/#{post_id}#comment-#{id} on post ##{post_id}:\n\n[quote]\n#{DText.excerpt(body, "@"+user_name)}\n[/quote]\n"},
)

View File

@@ -27,7 +27,6 @@ class ForumPost < ApplicationRecord
end
mentionable(
:message_field => :body,
:user_field => :creator_id,
:title => lambda {|user_name| %{#{creator_name} mentioned you in topic ##{topic_id} (#{topic.title})}},
:body => lambda {|user_name| %{@#{creator_name} mentioned you in topic ##{topic_id} ("#{topic.title}":[/forum_topics/#{topic_id}?page=#{forum_topic_page}]):\n\n[quote]\n#{DText.excerpt(body, "@"+user_name)}\n[/quote]\n}},
)