mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
narrow: Don't advertise streams:public in is:starred.
We fix this by adding a more expressive data function, with tests, for whether a filter is on UserMessage data, which would mean that streams:public could never add additional matches.
This commit is contained in:
@@ -446,6 +446,15 @@ Filter.prototype = {
|
||||
return this.has_operator("stream") || this.has_operator("streams");
|
||||
},
|
||||
|
||||
is_personal_filter: function () {
|
||||
// Whether the filter filters for user-specific data in the
|
||||
// UserMessage table, such as stars or mentions.
|
||||
//
|
||||
// Such filters should not advertise "streams:public" as it
|
||||
// will never add additional results.
|
||||
return this.has_operand("is", "mentioned") || this.has_operand("is", "starred");
|
||||
},
|
||||
|
||||
can_apply_locally: function () {
|
||||
if (this.is_search()) {
|
||||
// The semantics for matching keywords are implemented
|
||||
|
||||
Reference in New Issue
Block a user