diff --git a/src/matrix/net/HomeServerApi.ts b/src/matrix/net/HomeServerApi.ts index 7f0f17ca..e351ff19 100644 --- a/src/matrix/net/HomeServerApi.ts +++ b/src/matrix/net/HomeServerApi.ts @@ -271,6 +271,12 @@ export class HomeServerApi { return this._post(`/join/${encodeURIComponent(roomIdOrAlias)}`, {}, {}, options); } + invite(roomId: string, userId: string, options?: BaseRequestOptions): IHomeServerRequest { + return this._post(`/rooms/${encodeURIComponent(roomId)}/invite`, {}, { + user_id: userId + }, options); + } + leave(roomId: string, options?: BaseRequestOptions): IHomeServerRequest { return this._post(`/rooms/${encodeURIComponent(roomId)}/leave`, {}, {}, options); } @@ -298,6 +304,13 @@ export class HomeServerApi { return this._post(`/dehydrated_device/claim`, {}, {device_id: deviceId}, options); } + searchProfile(searchTerm: string, limit?: number, options?: BaseRequestOptions): IHomeServerRequest { + return this._post(`/user_directory/search`, {}, { + limit: limit ?? 10, + search_term: searchTerm, + }, options); + } + profile(userId: string, options?: BaseRequestOptions): IHomeServerRequest { return this._get(`/profile/${encodeURIComponent(userId)}`); }