mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
Add method to get/set room account data
This commit is contained in:
parent
b6d234af26
commit
40abc50478
@ -378,6 +378,24 @@ export class HomeServerApi {
|
|||||||
return this._put(`/user/${encodeURIComponent(ownUserId)}/account_data/${encodeURIComponent(type)}`, {}, content, options);
|
return this._put(`/user/${encodeURIComponent(ownUserId)}/account_data/${encodeURIComponent(type)}`, {}, content, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
roomAccountData(ownUserId: string, roomId: string, type: string, options?: BaseRequestOptions): IHomeServerRequest {
|
||||||
|
return this._get(
|
||||||
|
`/user/${encodeURIComponent(ownUserId)}/rooms/${encodeURIComponent(roomId)}/account_data/${encodeURIComponent(type)}`,
|
||||||
|
undefined,
|
||||||
|
undefined,
|
||||||
|
options
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
setRoomAccountData(ownUserId: string, roomId: string, type: string, content: Record<string, any>, options?: BaseRequestOptions): IHomeServerRequest {
|
||||||
|
return this._put(
|
||||||
|
`/user/${encodeURIComponent(ownUserId)}/rooms/${encodeURIComponent(roomId)}/account_data/${encodeURIComponent(type)}`,
|
||||||
|
{},
|
||||||
|
content,
|
||||||
|
options
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
getTurnServer(options?: BaseRequestOptions): IHomeServerRequest {
|
getTurnServer(options?: BaseRequestOptions): IHomeServerRequest {
|
||||||
return this._get(`/voip/turnServer`, undefined, undefined, options);
|
return this._get(`/voip/turnServer`, undefined, undefined, options);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user