Don't send mail to original author if they subscribe to their own RFC

This commit is contained in:
Maximilian Grundke
2017-09-13 14:41:09 +02:00
parent 85928361cb
commit 374f21592d

View File

@ -126,7 +126,9 @@ class CommentsController < ApplicationController
:user_id => commenter.id, :user_type => commenter.class.name)
subscriptions.each do |subscription|
if (subscription.subscription_type == 'author' and current_user == request_for_comment.user) or subscription.subscription_type == 'all'
UserMailer.got_new_comment_for_subscription(comment, subscription, current_user).deliver_now
if subscription.user != current_user
UserMailer.got_new_comment_for_subscription(comment, subscription, current_user).deliver_now
end
end
end
end