diff options
author | Heinrich Lee Yu <heinrich@gitlab.com> | 2019-07-01 16:23:11 +0800 |
---|---|---|
committer | Heinrich Lee Yu <heinrich@gitlab.com> | 2019-07-01 16:23:11 +0800 |
commit | eec2c480130b4faea3446e366f77221fa3f982f0 (patch) | |
tree | f3e206c80f710d7ffd4d7d1874de7a8b1b851509 /app/mailers/emails | |
parent | 7b1d9a159a302cfb5c6e82c8412eb7ece2e59931 (diff) | |
download | gitlab-ce-eec2c480130b4faea3446e366f77221fa3f982f0.tar.gz |
Remove group in notification email subject
This reverts to previous behavior where we have the group only when
we don't have a project
Diffstat (limited to 'app/mailers/emails')
-rw-r--r-- | app/mailers/emails/notes.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/mailers/emails/notes.rb b/app/mailers/emails/notes.rb index 506c8d251b7..04db1980b99 100644 --- a/app/mailers/emails/notes.rb +++ b/app/mailers/emails/notes.rb @@ -51,7 +51,7 @@ module Emails def note_thread_options(recipient_id) { from: sender(@note.author_id), - to: recipient(recipient_id, @group), + to: recipient(recipient_id, @project&.group || @group), subject: subject("#{@note.noteable.title} (#{@note.noteable.reference_link_text})") } end @@ -60,7 +60,7 @@ module Emails # `note_id` is a `Note` when originating in `NotifyPreview` @note = note_id.is_a?(Note) ? note_id : Note.find(note_id) @project = @note.project - @group = @project.try(:group) || @note.noteable.try(:group) + @group = @note.noteable.try(:group) if (@project || @group) && @note.persisted? @sent_notification = SentNotification.record_note(@note, recipient_id, reply_key) |