Previously, the message header for the "Messages sent by" view for
an invalid or unknown user was the value of the "sender" operand,
which was not a valid/known user email.
Now we show a standard title in the message header for this case:
"Messages sent by unknown user".
Earlier, when generating redirect url for search exit, we did not
encode the url in case of topic narrows. We expect some characters
to be replaced when generating hash.
This commit encodes the url for channels and topic narrows and
prevents redirecting to broken hashes.
Earlier, validating messages on given narrow skipped for channels
operator.
This commit adds channels operator support for checking if message
corresponds to given search term.
This renames the function to `contains_no_partial_conversations`. The
function initially was created to determine whether its appropriate to
collapse recipient/sender headings. Since then it has many other use
cases, so it's renamed to clearly describe what it does instead.
Fixes
https://chat.zulip.org/#narrow/channel/9-issues/topic/Starred.20messages.20view.20performance/near/2184251.
Anchor for starred messages was `first_unread` and the query to find
first_unread in a user's starred messages can turn out to be expensive.
This commit ensures that we default to newest instead since first_unread
is not of important for the starred messages view.
By excluding starred messages from using `first_unread`, it will default
to newest based on the logic in message_view.ts.
Previously, typing "channels: public" would show "Channels public"
in the typeahead, which was especially confusing because we'd show
"All public channels" until the term was completely typed out.
Searching e.g. "NASA" would put "nasa" in the search bar if you
selected "search for NASA" in the typeahead. This probably looks
weird to users, so let's not lowercase search operands.
For the DM conversation with the current user, show "Messages with
yourself" for the title, which is determined by the filter for the
message list view.
Co-authored-by: Lauryn Menard <lauryn@zulip.com>
Fixes#31315.
We want to parse sender:me with the email when turning it into
a pill, but not before then so that "Sent by me" is still the
search string in the suggestions.
Add the `is:muted` search operator.
`-is:muted` is an alias for the `in:home` operator.
Co-authored-by: Kenneth <Kenneth012004@outlook.com>
Fixes#16943
Previously, mentions from muted channels were incorrectly excluded when
narrowing down to `-in:home`. Additionally, messages from all muted
topics were missing in the results.
This commit solves the above listed issues.
The relevant legacy logic being removed dates to when we didn't
support unmuting or following topics.
This commit updates the traditional url of a channel-topic narrow
to topic permalink upon arrival of new message in the narrow, by
using the `with` operator on it.
The requirement for this change arises when we navigate to an
empty topic. Since it has no messages yet, we fallback to the
traditional channel-topic links. However, when a new message
arrives to this empty topic, we want the url to live update to
a permalink of the narrow.
This is done as an effort to make sure channel-topic narrows
always contain `with` term.
This commit adds support to display `realm_empty_topic_display_name`
value (in italics) in the search suggestions & search input pills
for topics having the actual value of empty string.