mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 02:19:27 +08:00
FEATURE: add description in 'List-Id' mail headers
https://meta.discourse.org/t/minor-feature-request-descriptions-in-list-id-headers/86681
This commit is contained in:
parent
980972182f
commit
7d223c0e55
|
@ -114,15 +114,15 @@ module Email
|
||||||
|
|
||||||
# https://www.ietf.org/rfc/rfc2919.txt
|
# https://www.ietf.org/rfc/rfc2919.txt
|
||||||
if topic && topic.category && !topic.category.uncategorized?
|
if topic && topic.category && !topic.category.uncategorized?
|
||||||
list_id = "<#{topic.category.name.downcase.tr(' ', '-')}.#{host}>"
|
list_id = "#{SiteSetting.title} | #{topic.category.name} <#{topic.category.name.downcase.tr(' ', '-')}.#{host}>"
|
||||||
|
|
||||||
# subcategory case
|
# subcategory case
|
||||||
if !topic.category.parent_category_id.nil?
|
if !topic.category.parent_category_id.nil?
|
||||||
parent_category_name = Category.find_by(id: topic.category.parent_category_id).name
|
parent_category_name = Category.find_by(id: topic.category.parent_category_id).name
|
||||||
list_id = "<#{topic.category.name.downcase.tr(' ', '-')}.#{parent_category_name.downcase.tr(' ', '-')}.#{host}>"
|
list_id = "#{SiteSetting.title} | #{topic.category.name} #{parent_category_name} <#{topic.category.name.downcase.tr(' ', '-')}.#{parent_category_name.downcase.tr(' ', '-')}.#{host}>"
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
list_id = "<#{host}>"
|
list_id = "#{SiteSetting.title} <#{host}>"
|
||||||
end
|
end
|
||||||
|
|
||||||
# https://www.ietf.org/rfc/rfc3834.txt
|
# https://www.ietf.org/rfc/rfc3834.txt
|
||||||
|
|
Loading…
Reference in New Issue
Block a user