diff --git a/frontend_tests/node_tests/stream_events.js b/frontend_tests/node_tests/stream_events.js index 9a78f441cf..37d46c8b45 100644 --- a/frontend_tests/node_tests/stream_events.js +++ b/frontend_tests/node_tests/stream_events.js @@ -109,7 +109,7 @@ run_test('update_property', () => { with_overrides(function (override) { global.with_stub(function (stub) { override('subs.update_stream_description', stub.f); - stream_events.update_property(1, 'description', 'we write code'); + stream_events.update_property(1, 'description', 'we write code', {rendered_description: 'we write code'}); var args = stub.get_args('sub', 'val'); assert.equal(args.sub.stream_id, 1); assert.equal(args.val, 'we write code'); diff --git a/static/js/server_events_dispatch.js b/static/js/server_events_dispatch.js index 52e2cf2851..a8021277f0 100644 --- a/static/js/server_events_dispatch.js +++ b/static/js/server_events_dispatch.js @@ -266,8 +266,9 @@ exports.dispatch_normal_event = function dispatch_normal_event(event) { event.stream_id, event.property, event.value, - event.rendered_description - ); + { + rendered_description: event.rendered_description, + }); settings_streams.update_default_streams_table(); } else if (event.op === 'create') { stream_data.create_streams(event.streams); diff --git a/static/js/stream_events.js b/static/js/stream_events.js index abc9dac3bb..bd682a894d 100644 --- a/static/js/stream_events.js +++ b/static/js/stream_events.js @@ -32,7 +32,7 @@ function update_stream_pin(sub, value) { sub.pin_to_top = value; } -exports.update_property = function (stream_id, property, value, rendered_description) { +exports.update_property = function (stream_id, property, value, other_values) { var sub = stream_data.get_sub_by_id(stream_id); if (sub === undefined) { // This isn't a stream we know about, so ignore it. @@ -65,7 +65,7 @@ exports.update_property = function (stream_id, property, value, rendered_descrip subs.update_stream_name(sub, value); break; case 'description': - subs.update_stream_description(sub, value, rendered_description); + subs.update_stream_description(sub, value, other_values.rendered_description); break; case 'email_address': sub.email_address = value;