Fix how we find if streams are muted.

This commit changes stream_data.in_home_view() to
take a stream_id parameter, which will make it more
robust to stream name changes.

This fixes a bug.  Now when an admin renames a stream
you are looking at, it will correctly show itself to
be un-muted. (Even with this fix, though, the stream
appears to be inactive.)

Some callers still do lookups by name, and they will
call name_in_home_view() for now, which we can
hopefully deprecate over time.
This commit is contained in:
Steve Howell
2017-05-13 11:54:53 -07:00
committed by Tim Abbott
parent d3a7aa3a37
commit c125ba1d08
10 changed files with 47 additions and 15 deletions

View File

@@ -151,6 +151,10 @@ var zero_counts = {
assert.equal(count, 0);
}());
stream_data.get_stream_id = function () {
return 999;
};
(function test_muting() {
stream_data.is_subscribed = function () {
return true;