Merge branch 'thirdroom/dev' of https://github.com/vector-im/hydrogen-web into thirdroom/dev
This commit is contained in:
commit
dfc84186a8
1 changed files with 21 additions and 0 deletions
|
@ -285,6 +285,27 @@ export class HomeServerApi {
|
||||||
return this._post(`/rooms/${encodeURIComponent(roomId)}/forget`, {}, {}, options);
|
return this._post(`/rooms/${encodeURIComponent(roomId)}/forget`, {}, {}, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
kick(roomId: string, userId: string, reason?: string, options?: BaseRequestOptions): IHomeServerRequest {
|
||||||
|
return this._post(`/rooms/${encodeURIComponent(roomId)}/kick`, {}, {
|
||||||
|
user_id: userId,
|
||||||
|
reason: reason,
|
||||||
|
}, options);
|
||||||
|
}
|
||||||
|
|
||||||
|
ban(roomId: string, userId: string, reason?: string, options?: BaseRequestOptions): IHomeServerRequest {
|
||||||
|
return this._post(`/rooms/${encodeURIComponent(roomId)}/ban`, {}, {
|
||||||
|
user_id: userId,
|
||||||
|
reason: reason,
|
||||||
|
}, options);
|
||||||
|
}
|
||||||
|
|
||||||
|
unban(roomId: string, userId: string, reason?: string, options?: BaseRequestOptions): IHomeServerRequest {
|
||||||
|
return this._post(`/rooms/${encodeURIComponent(roomId)}/unban`, {}, {
|
||||||
|
user_id: userId,
|
||||||
|
reason: reason,
|
||||||
|
}, options);
|
||||||
|
}
|
||||||
|
|
||||||
logout(options?: BaseRequestOptions): IHomeServerRequest {
|
logout(options?: BaseRequestOptions): IHomeServerRequest {
|
||||||
return this._post(`/logout`, {}, {}, options);
|
return this._post(`/logout`, {}, {}, options);
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue