diaspora/app/mailers/notification_mailers/comment_on_post.rb

16 lines
495 B
Ruby

module NotificationMailers
class CommentOnPost < NotificationMailers::Base
attr_accessor :comment
def set_headers(comment_id)
@comment = Comment.find(comment_id)
@headers[:from] = "\"#{@comment.author_name} (diaspora*)\" <#{AppConfig.mail.sender_address}>"
if @comment.public?
@headers[:subject] = "Re: #{@comment.comment_email_subject}"
else
@headers[:subject] = I18n.t("notifier.comment_on_post.limited_subject")
end
end
end
end