Skip to content

Commit bd325af

Browse files
Normalize queryDrafts sort
1 parent eb29626 commit bd325af

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/client.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4071,6 +4071,12 @@ export class StreamChat<StreamChatGenerics extends ExtendableGenerics = DefaultG
40714071
user_id?: string;
40724072
} = {},
40734073
) {
4074-
return await this.post<QueryDraftsResponse<StreamChatGenerics>>(this.baseURL + '/drafts/query', options);
4074+
const payload = {
4075+
filter: options.filter,
4076+
user_id: options.user_id,
4077+
sort: options.sort ? normalizeQuerySort(options.sort) : undefined,
4078+
};
4079+
4080+
return await this.post<QueryDraftsResponse<StreamChatGenerics>>(this.baseURL + '/drafts/query', payload);
40754081
}
40764082
}

0 commit comments

Comments
 (0)