From 374f21592dbf5cb7338ebc7db5fed0f2173c1ea0 Mon Sep 17 00:00:00 2001 From: Maximilian Grundke Date: Wed, 13 Sep 2017 14:41:09 +0200 Subject: [PATCH] Don't send mail to original author if they subscribe to their own RFC --- app/controllers/comments_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index bfc0fc77..948f3e5b 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -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