From a69f45d0daa6b5968ee9b75cb658ba0f2be8a37a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Wed, 16 Nov 2016 22:06:07 +0100 Subject: [PATCH] FEATURE: new 'always_show_trimmed_content' site setting --- config/locales/server.en.yml | 1 + config/site_settings.yml | 1 + lib/email/receiver.rb | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index adddf4aaf27..26622bfe558 100644 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -1247,6 +1247,7 @@ en: attachment_filename_blacklist: "List of keywords used to blacklist attachments based on the filename." enable_forwarded_emails: "[BETA] Allow users to create a topic by forwarding an email in." + always_show_trimmed_content: "Always show trimmed part of incoming emails. WARNING: might reveal email addresses." manual_polling_enabled: "Push emails using the API for email replies." pop3_polling_enabled: "Poll via POP3 for email replies." diff --git a/config/site_settings.yml b/config/site_settings.yml index 26e4215d4b6..0005bc48ba8 100644 --- a/config/site_settings.yml +++ b/config/site_settings.yml @@ -671,6 +671,7 @@ email: type: list default: "smime.p7s|signature.asc" enable_forwarded_emails: false + always_show_trimmed_content: false files: max_image_size_kb: diff --git a/lib/email/receiver.rb b/lib/email/receiver.rb index 09be5327521..7b8556bbb41 100644 --- a/lib/email/receiver.rb +++ b/lib/email/receiver.rb @@ -557,7 +557,7 @@ module Email options[:topic].try(:private_message?) # only add elided part in messages - if options[:elided].present? && is_private_message + if options[:elided].present? && (SiteSetting.always_show_trimmed_content || is_private_message) options[:raw] << "\n\n" << "
" << "\n" options[:raw] << "···" << "\n" options[:raw] << options[:elided] << "\n"