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.
This commit is contained in:
sahil839 2020-07-10 00:56:00 +05:30 committed by Tim Abbott
parent bf31d92fa7
commit 67ea4bd937

View File

@ -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);
}
};