allow adding tags as a custom subject format for emails (#5846)

allow adding tags as a custom subject format for emails
This commit is contained in:
Maja Komel
2018-07-11 04:24:07 +02:00
committed by Sam
parent bdf3da8f80
commit 0942e2c795
3 changed files with 26 additions and 1 deletions

View File

@ -66,6 +66,7 @@ module Email
subject.gsub!("%{optional_re}", @opts[:add_re_to_subject] ? I18n.t('subject_re', @template_args) : '')
subject.gsub!("%{optional_pm}", @opts[:private_reply] ? @template_args[:subject_pm] : '')
subject.gsub!("%{optional_cat}", @template_args[:show_category_in_subject] ? "[#{@template_args[:show_category_in_subject]}] " : '')
subject.gsub!("%{optional_tags}", @template_args[:show_tags_in_subject] ? "#{@template_args[:show_tags_in_subject]} " : '')
subject.gsub!("%{topic_title}", @template_args[:topic_title]) if @template_args[:topic_title] # must be last for safety
else
subject = @opts[:subject]