diff --git a/static/js/ui.js b/static/js/ui.js
index 621e90d6c7..dad03096a5 100644
--- a/static/js/ui.js
+++ b/static/js/ui.js
@@ -1060,6 +1060,10 @@ $(function () {
page_params.enable_offline_push_notifications = result.enable_offline_push_notifications;
}
+ if (result.enable_digest_emails !== undefined) {
+ page_params.enable_digest_emails = result.enable_digest_emails;
+ }
+
notify_settings_status.removeClass(status_classes)
.addClass('alert-success')
.text(message).stop(true).fadeTo(0,1);
diff --git a/templates/zerver/settings.html b/templates/zerver/settings.html
index 83d7119c89..c47f0cfb79 100644
--- a/templates/zerver/settings.html
+++ b/templates/zerver/settings.html
@@ -150,6 +150,18 @@
+
+
+
+
+
+
+
Change notification settings for individual streams on your Streams page.
diff --git a/zerver/views/__init__.py b/zerver/views/__init__.py
index e8c9c84413..28d2fd3d37 100644
--- a/zerver/views/__init__.py
+++ b/zerver/views/__init__.py
@@ -768,6 +768,7 @@ def home(request):
user_profile.enable_offline_email_notifications,
enable_offline_push_notifications =
user_profile.enable_offline_push_notifications,
+ enable_digest_emails = user_profile.enable_digest_emails,
event_queue_id = register_ret['queue_id'],
last_event_id = register_ret['last_event_id'],
max_message_id = register_ret['max_message_id'],
@@ -1843,7 +1844,9 @@ def json_change_notify_settings(request, user_profile,
enable_offline_email_notifications=REQ(converter=lambda x: x == "on",
default=False),
enable_offline_push_notifications=REQ(converter=lambda x: x == "on",
- default=False)):
+ default=False),
+ enable_digest_emails=REQ(converter=lambda x: x == "on",
+ default=False)):
result = {}
@@ -1863,6 +1866,10 @@ def json_change_notify_settings(request, user_profile,
do_change_enable_offline_push_notifications(user_profile, enable_offline_push_notifications)
result['enable_offline_push_notifications'] = enable_offline_push_notifications
+ if user_profile.enable_digest_emails != enable_digest_emails:
+ do_change_enable_digest_emails(user_profile, enable_digest_emails)
+ result['enable_digest_emails'] = enable_digest_emails
+
return json_success(result)
@authenticated_json_post_view