Skip to content

Commit f91b4be

Browse files
Merge pull request #914 from GetStream/vishal/mentions-issue
fix: issue with autocomplete suggestions for channel with more than 100 members
2 parents aa952bb + 19f9a07 commit f91b4be

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

package/src/utils/utils.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,12 @@ const queryMembers = async <
153153
channel: Channel<At, Ch, Co, Ev, Me, Re, Us>,
154154
query: SuggestionUser<Us>['name'],
155155
onReady?: (users: SuggestionUser<Us>[]) => void,
156-
limit = defaultAutoCompleteSuggestionsLimit,
156+
options: {
157+
limit?: number;
158+
} = {},
157159
): Promise<void> => {
160+
const { limit = defaultAutoCompleteSuggestionsLimit } = options;
161+
158162
if (typeof query === 'string') {
159163
const response = (await (channel as unknown as Channel).queryMembers(
160164
{

0 commit comments

Comments
 (0)