From 67ea4bd937795bb5ad0efa7399042ed18787bb6b Mon Sep 17 00:00:00 2001 From: sahil839 Date: Fri, 10 Jul 2020 00:56:00 +0530 Subject: [PATCH] stream: Fix incorrect dispaly of stream notifications settings. The stream notification settings checkboxes were not checked even when the notifications were turned on for the stream. This was happening because we were passing stream name to receives_notifications instead of stream id. This commit fixes the bug by passing stream id to receives_notifications. This change should have been done in f3604fb while refactoring receives_notifications to use stream id instead of name. --- static/js/stream_data.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/stream_data.js b/static/js/stream_data.js index 5358332a82..84a92af2f8 100644 --- a/static/js/stream_data.js +++ b/static/js/stream_data.js @@ -504,7 +504,7 @@ exports.update_calculated_fields = function (sub) { // Apply the defaults for our notification settings for rendering. for (const setting of settings_config.stream_specific_notification_settings) { - sub[setting + "_display"] = exports.receives_notifications(sub.name, setting); + sub[setting + "_display"] = exports.receives_notifications(sub.stream_id, setting); } };