mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
Use stream_data.get_name() in narrow_state.stream().
Using get_name() is more robust for stream name changes. This fixes, for example, the situation where you narrow to a stream, edit it via the sidebar, and then close the modal, and the message redraw logic thinks you have unsubscribed. Fixes #4686.
This commit is contained in:
@@ -98,7 +98,11 @@ exports.stream = function () {
|
|||||||
}
|
}
|
||||||
var stream_operands = current_filter.operands("stream");
|
var stream_operands = current_filter.operands("stream");
|
||||||
if (stream_operands.length === 1) {
|
if (stream_operands.length === 1) {
|
||||||
return stream_operands[0];
|
var name = stream_operands[0];
|
||||||
|
|
||||||
|
// Use get_name() to get the most current stream
|
||||||
|
// name (considering renames and capitalization).
|
||||||
|
return stream_data.get_name(name);
|
||||||
}
|
}
|
||||||
return undefined;
|
return undefined;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user