forked from mystiq/hydrogen-web
add hs endpoint for backup keys upload
This commit is contained in:
parent
290aaad63a
commit
8f4e3c62ce
1 changed files with 4 additions and 0 deletions
|
@ -227,6 +227,10 @@ export class HomeServerApi {
|
|||
return this._get(`/room_keys/keys/${encodeURIComponent(roomId)}/${encodeURIComponent(sessionId)}`, {version}, undefined, options);
|
||||
}
|
||||
|
||||
uploadRoomKeysToBackup(version: string, payload: Record<string, any>, options?: IRequestOptions): IHomeServerRequest {
|
||||
return this._put(`/room_keys/keys`, {version}, payload, options);
|
||||
}
|
||||
|
||||
uploadAttachment(blob: Blob, filename: string, options?: IRequestOptions): IHomeServerRequest {
|
||||
return this._authedRequest("POST", `${this._homeserver}/_matrix/media/r0/upload`, {filename}, blob, options);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue