From c94b21e9ac5a4fe19b6bccb295206aec2cce8b03 Mon Sep 17 00:00:00 2001 From: YJDave Date: Wed, 29 Nov 2017 18:12:39 +0530 Subject: [PATCH] settings: Add setting to disable message content in missed message emails. Fixes #6938. --- static/js/settings_notifications.js | 1 + .../settings/notification-settings.handlebars | 15 +++- templates/zerver/emails/missed_message.html | 3 +- .../zerver/emails/missed_message.subject | 13 +-- templates/zerver/emails/missed_message.txt | 6 +- zerver/lib/notifications.py | 7 ++ ..._message_content_in_email_notifications.py | 20 +++++ zerver/models.py | 2 + zerver/tests/test_home.py | 1 + zerver/tests/test_notifications.py | 81 +++++++++++++++---- zerver/views/user_settings.py | 5 +- 11 files changed, 127 insertions(+), 27 deletions(-) create mode 100644 zerver/migrations/0146_userprofile_message_content_in_email_notifications.py diff --git a/static/js/settings_notifications.js b/static/js/settings_notifications.js index c108c4a507..0d0f5b6445 100644 --- a/static/js/settings_notifications.js +++ b/static/js/settings_notifications.js @@ -20,6 +20,7 @@ var pm_mention_notification_settings = [ var other_notification_settings = [ "enable_digest_emails", "realm_name_in_notifications", + "message_content_in_email_notifications", ]; exports.notification_settings = other_notification_settings.concat( diff --git a/static/templates/settings/notification-settings.handlebars b/static/templates/settings/notification-settings.handlebars index b0b2336d8f..eadb987277 100644 --- a/static/templates/settings/notification-settings.handlebars +++ b/static/templates/settings/notification-settings.handlebars @@ -154,7 +154,20 @@ {{t "Send digest emails when I'm away" }} - +
+ + +