summaryrefslogtreecommitdiff
path: root/app/mailers
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-12-11 13:33:27 +0100
committerRémy Coutable <remy@rymai.me>2018-12-11 15:13:42 +0100
commit24f9fa11a317f04e75b63e241d0ceeb75fdd38a8 (patch)
tree4b411cd9fc03c7315e4aaaea4a2babde578f1a26 /app/mailers
parentb388111f6ed5181c357f5c37277f16c6ae234f5a (diff)
downloadgitlab-ce-24f9fa11a317f04e75b63e241d0ceeb75fdd38a8.tar.gz
Fix a potential frozen string error in app/mailers/notify.rb
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/mailers')
-rw-r--r--app/mailers/notify.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/mailers/notify.rb b/app/mailers/notify.rb
index 88ad4c3e893..6d86b60c50c 100644
--- a/app/mailers/notify.rb
+++ b/app/mailers/notify.rb
@@ -128,7 +128,7 @@ class Notify < BaseMailer
address.display_name = reply_display_name(model)
end
- fallback_reply_message_id = "<reply-#{reply_key}@#{Gitlab.config.gitlab.host}>".freeze
+ fallback_reply_message_id = "<reply-#{reply_key}@#{Gitlab.config.gitlab.host}>"
headers['References'] ||= []
headers['References'].unshift(fallback_reply_message_id)
@@ -178,7 +178,7 @@ class Notify < BaseMailer
headers['X-GitLab-Discussion-ID'] = note.discussion.id if note.part_of_discussion?
- headers[:subject]&.prepend('Re: ')
+ headers[:subject] = "Re: #{headers[:subject]}" if headers[:subject]
mail_thread(model, headers)
end