diff options
Diffstat (limited to 'app/controllers/sent_notifications_controller.rb')
-rw-r--r-- | app/controllers/sent_notifications_controller.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/sent_notifications_controller.rb b/app/controllers/sent_notifications_controller.rb index 6069924b39a..6c5e709a98a 100644 --- a/app/controllers/sent_notifications_controller.rb +++ b/app/controllers/sent_notifications_controller.rb @@ -29,6 +29,10 @@ class SentNotificationsController < ApplicationController def unsubscribe_and_redirect noteable.unsubscribe(@sent_notification.recipient, @sent_notification.project) + if noteable.is_a?(Issue) && @sent_notification.recipient_id == User.support_bot.id + noteable.unsubscribe_email_participant(noteable.external_author) + end + flash[:notice] = _("You have been unsubscribed from this thread.") if current_user |