Skip to content

Commit

Permalink
Add options to http REST call in searchUserDirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
thoraj committed Aug 22, 2024
1 parent d10cde3 commit 7fbb1bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8548,7 +8548,7 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
* @param options.limit - the maximum number of results to return. The server will apply a limit if unspecified.
* @returns Promise which resolves: an array of results.
*/
public searchUserDirectory({ term, limit }: { term: string; limit?: number }, extraBodyArgs: {[key:string]: string}|null = {}): Promise<IUserDirectoryResponse> {
public searchUserDirectory({ term, limit }: { term: string; limit?: number }, extraBodyArgs: {[key:string]: string}|null = {}, extraOptions: IRequestOpts = {}): Promise<IUserDirectoryResponse> {
const body: Body = {
search_term: term,
...extraBodyArgs
Expand All @@ -8558,7 +8558,7 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
body.limit = limit;
}

return this.http.authedRequest(Method.Post, "/user_directory/search", undefined, body);
return this.http.authedRequest(Method.Post, "/user_directory/search", undefined, body, extraOptions);
}

/**
Expand Down

0 comments on commit 7fbb1bc

Please sign in to comment.