mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-11-20 03:25:52 +01:00
uploadRoomKeysToBackup: Use V3 route
Fixes https://github.com/element-hq/hydrogen-web/issues/741 "Tested" locally by rewriting `r0` to `v3` in reverse proxy (Caddy) and seeing `All keys are backed up.` instead of repeated failing PUT requests towards Conduit (home server) ``` matrix.example.com { rewrite /_matrix/client/r0/room_keys/keys /_matrix/client/v3/room_keys/keys?{query} reverse_proxy /_matrix/* localhost:8448 } ```
This commit is contained in:
parent
62332fe6a1
commit
e924a76b4b
@ -251,7 +251,8 @@ export class HomeServerApi {
|
||||
return this._get(`/room_keys/keys/${encodeURIComponent(roomId)}/${encodeURIComponent(sessionId)}`, {version}, undefined, options);
|
||||
}
|
||||
|
||||
uploadRoomKeysToBackup(version: string, payload: Record<string, any>, options?: BaseRequestOptions): IHomeServerRequest {
|
||||
uploadRoomKeysToBackup(version: string, payload: Record<string, any>, options: BaseRequestOptions = {}): IHomeServerRequest {
|
||||
options.prefix = CS_V3_PREFIX;
|
||||
return this._put(`/room_keys/keys`, {version}, payload, options);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user