mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-11-20 11:36:24 +01:00
commit
586513bf5b
@ -25,6 +25,7 @@ export {AttachmentUpload} from "./matrix/room/AttachmentUpload";
|
||||
export {CallIntent} from "./matrix/calls/callEventTypes";
|
||||
export {OidcApi} from "./matrix/net/OidcApi";
|
||||
export {OIDCLoginMethod} from "./matrix/login/OIDCLoginMethod";
|
||||
export { makeTxnId } from './matrix/common'
|
||||
// export everything needed to observe state events on all rooms using session.observeRoomState
|
||||
export type {RoomStateHandler} from "./matrix/room/state/types";
|
||||
export type {MemberChange} from "./matrix/room/members/RoomMember";
|
||||
|
@ -155,6 +155,10 @@ export class HomeServerApi {
|
||||
send(roomId: string, eventType: string, txnId: string, content: Record<string, any>, options?: BaseRequestOptions): IHomeServerRequest {
|
||||
return this._put(`/rooms/${encodeURIComponent(roomId)}/send/${encodeURIComponent(eventType)}/${encodeURIComponent(txnId)}`, {}, content, options);
|
||||
}
|
||||
|
||||
event(roomId: string, eventId: string , options?: BaseRequestOptions): IHomeServerRequest {
|
||||
return this._get(`/rooms/${encodeURIComponent(roomId)}/event/${encodeURIComponent(eventId)}`, undefined, undefined, options);
|
||||
}
|
||||
|
||||
redact(roomId: string, eventId: string, txnId: string, content: Record<string, any>, options?: BaseRequestOptions): IHomeServerRequest {
|
||||
return this._put(`/rooms/${encodeURIComponent(roomId)}/redact/${encodeURIComponent(eventId)}/${encodeURIComponent(txnId)}`, {}, content, options);
|
||||
@ -374,6 +378,24 @@ export class HomeServerApi {
|
||||
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 {
|
||||
return this._get(`/voip/turnServer`, undefined, undefined, options);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user