From 9dc93a4519d9d5d7be48ff274127136236a3adb3 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 20 Apr 2021 23:50:22 +0000 Subject: Add latest changes from gitlab-org/gitlab@13-11-stable-ee --- app/mailers/notify.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/mailers/notify.rb') diff --git a/app/mailers/notify.rb b/app/mailers/notify.rb index 8f947ea7113..5f5afef350b 100644 --- a/app/mailers/notify.rb +++ b/app/mailers/notify.rb @@ -70,7 +70,7 @@ class Notify < ApplicationMailer return unless sender = User.find(sender_id) address = default_sender_address - address.display_name = sender_name.presence || sender.name + address.display_name = sender_name.presence || "#{sender.name} (#{sender.to_reference})" if send_from_user_email && can_send_from_user_email?(sender) address.address = sender.email @@ -178,7 +178,7 @@ class Notify < ApplicationMailer headers['In-Reply-To'] = message_id(note.references.last) headers['References'] = note.references.map { |ref| message_id(ref) } - headers['X-GitLab-Discussion-ID'] = note.discussion.id if note.part_of_discussion? + headers['X-GitLab-Discussion-ID'] = note.discussion.id if note.part_of_discussion? || note.can_be_discussion_note? headers[:subject] = "Re: #{headers[:subject]}" if headers[:subject] -- cgit v1.2.3