mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
filter: Mark messages as read in -is:dm view.
We avoid doing the more complex composability here, since that's potentially risky. Fixes #25113.
This commit is contained in:
@@ -1204,6 +1204,10 @@ export class Filter {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (_.isEqual(term_types, ["not-is-dm"])) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (_.isEqual(term_types, ["is-resolved"])) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -347,6 +347,21 @@ test("basics", () => {
|
||||
assert.ok(filter.can_show_next_unread_dm_conversation_button());
|
||||
assert.ok(!filter.has_exactly_channel_topic_operators());
|
||||
|
||||
terms = [{operator: "is", operand: "dm", negated: true}];
|
||||
filter = new Filter(terms);
|
||||
assert.ok(!filter.contains_only_private_messages());
|
||||
assert.ok(filter.can_mark_messages_read());
|
||||
assert.ok(filter.contains_no_partial_conversations());
|
||||
assert.ok(!filter.has_operator("search"));
|
||||
assert.ok(filter.can_apply_locally());
|
||||
assert.ok(!filter.is_personal_filter());
|
||||
assert.ok(!filter.is_conversation_view());
|
||||
assert.ok(!filter.is_channel_view());
|
||||
assert.ok(filter.may_contain_multiple_conversations());
|
||||
assert.ok(!filter.can_show_next_unread_topic_conversation_button());
|
||||
assert.ok(!filter.can_show_next_unread_dm_conversation_button());
|
||||
assert.ok(!filter.has_exactly_channel_topic_operators());
|
||||
|
||||
// "is:private" was renamed to "is:dm"
|
||||
terms = [{operator: "is", operand: "private"}];
|
||||
filter = new Filter(terms);
|
||||
|
||||
Reference in New Issue
Block a user