compose: Show system groups in silent mentions typeahead.

This commit is contained in:
Sahil Batra
2025-01-13 17:35:24 +05:30
committed by Tim Abbott
parent 2e4d4c1d6a
commit 1fcda48d68
2 changed files with 7 additions and 4 deletions

View File

@@ -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) => ({

View File

@@ -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", []);