mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
compose: Show system groups in silent mentions typeahead.
This commit is contained in:
@@ -705,7 +705,7 @@ export function get_person_suggestions(
|
|||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
groups = user_groups.get_realm_user_groups();
|
groups = user_groups.get_all_realm_user_groups();
|
||||||
}
|
}
|
||||||
|
|
||||||
const group_pill_data: UserGroupPillData[] = groups.map((group) => ({
|
const group_pill_data: UserGroupPillData[] = groups.map((group) => ({
|
||||||
|
|||||||
@@ -1605,7 +1605,9 @@ test("begins_typeahead", ({override, override_rewire}) => {
|
|||||||
// alphabetical
|
// alphabetical
|
||||||
hamletcharacters, // "Characters of Hamlet"
|
hamletcharacters, // "Characters of Hamlet"
|
||||||
backend,
|
backend,
|
||||||
call_center, // "folks working in support"
|
call_center, // "folks working in support",
|
||||||
|
admins,
|
||||||
|
members,
|
||||||
];
|
];
|
||||||
const mention_everyone = broadcast_item(ct.broadcast_mentions()[1]);
|
const mention_everyone = broadcast_item(ct.broadcast_mentions()[1]);
|
||||||
function mentions_with_silent_marker(mentions, is_silent) {
|
function mentions_with_silent_marker(mentions, is_silent) {
|
||||||
@@ -1631,7 +1633,7 @@ test("begins_typeahead", ({override, override_rewire}) => {
|
|||||||
);
|
);
|
||||||
assert_typeahead_equals(
|
assert_typeahead_equals(
|
||||||
"test @_**o",
|
"test @_**o",
|
||||||
mentions_with_silent_marker([othello_item, cordelia_item], true),
|
mentions_with_silent_marker([othello_item, cordelia_item, admins], true),
|
||||||
);
|
);
|
||||||
assert_typeahead_equals(
|
assert_typeahead_equals(
|
||||||
"test @*o",
|
"test @*o",
|
||||||
@@ -1698,6 +1700,7 @@ test("begins_typeahead", ({override, override_rewire}) => {
|
|||||||
twin1_item,
|
twin1_item,
|
||||||
twin2_item,
|
twin2_item,
|
||||||
othello_item,
|
othello_item,
|
||||||
|
admins,
|
||||||
],
|
],
|
||||||
true,
|
true,
|
||||||
),
|
),
|
||||||
@@ -1749,7 +1752,7 @@ test("begins_typeahead", ({override, override_rewire}) => {
|
|||||||
);
|
);
|
||||||
assert_typeahead_equals(
|
assert_typeahead_equals(
|
||||||
"test @_o",
|
"test @_o",
|
||||||
mentions_with_silent_marker([othello_item, cordelia_item], true),
|
mentions_with_silent_marker([othello_item, cordelia_item, admins], true),
|
||||||
);
|
);
|
||||||
assert_typeahead_equals("test @z", []);
|
assert_typeahead_equals("test @z", []);
|
||||||
assert_typeahead_equals("test @_z", []);
|
assert_typeahead_equals("test @_z", []);
|
||||||
|
|||||||
Reference in New Issue
Block a user