mirror of
https://github.com/zulip/zulip.git
synced 2025-11-12 18:06:44 +00:00
filter: Use "channel" operator for the Filter class.
Update the Filter class to use "channel" as the canoncial operator for streams, but keep using "stream" for user-facing text and URLs. When searching, "channel" does not create any suggestions until a colon is added and then it shows suggestions with "stream". And when a search string with channel as an operator is entered, then it is replaced by "stream" as well. Part of stream to channel rename project.
This commit is contained in:
committed by
Tim Abbott
parent
e3a521f4ba
commit
1e7c5b38f8
@@ -164,9 +164,9 @@ export function initialize(): void {
|
||||
if (narrow_filter === undefined) {
|
||||
display_current_view = $t({defaultMessage: "Currently viewing all messages."});
|
||||
} else if (
|
||||
_.isEqual(narrow_filter.sorted_term_types(), ["stream"]) &&
|
||||
_.isEqual(narrow_filter.sorted_term_types(), ["channel"]) &&
|
||||
compose_state.get_message_type() === "stream" &&
|
||||
narrow_filter.operands("stream")[0] === compose_state.stream_name()
|
||||
narrow_filter.operands("channel")[0] === compose_state.stream_name()
|
||||
) {
|
||||
display_current_view = $t({
|
||||
defaultMessage: "Currently viewing the entire stream.",
|
||||
|
||||
Reference in New Issue
Block a user