Pass global stream notification settings between frontend and backend.

(imported from commit 28ec021e8e5166d3b270c81c5a4ad543d2185aa5)
This commit is contained in:
Jessica McKellar
2014-02-05 15:41:01 -05:00
parent df39a7bde2
commit c673b3b0b1
4 changed files with 102 additions and 5 deletions

View File

@@ -1084,6 +1084,17 @@ $(function () {
var message = "Updated notification settings!";
var result = $.parseJSON(xhr.responseText);
// Stream notification settings.
if (result.enable_stream_desktop_notifications !== undefined) {
page_params.stream_desktop_notifications_enabled = result.enable_stream_desktop_notifications;
}
if (result.enable_stream_sounds !== undefined) {
page_params.stream_sounds_enabled = result.enable_stream_sounds;
}
// PM and @-mention notification settings.
if (result.enable_desktop_notifications !== undefined) {
page_params.desktop_notifications_enabled = result.enable_desktop_notifications;
}
@@ -1099,6 +1110,8 @@ $(function () {
page_params.enable_offline_push_notifications = result.enable_offline_push_notifications;
}
// Other notification settings.
if (result.enable_digest_emails !== undefined) {
page_params.enable_digest_emails = result.enable_digest_emails;
}