Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2700,7 +2700,7 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
try {
res = await this.http.authedRequest<IKeyBackupInfo>(
undefined, Method.Get, "/room_keys/version", undefined, undefined,
{ prefix: PREFIX_UNSTABLE },
{ prefix: PREFIX_V3 },
);
} catch (e) {
if (e.errcode === 'M_NOT_FOUND') {
Expand Down Expand Up @@ -2856,7 +2856,7 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa

const res = await this.http.authedRequest<IKeyBackupInfo>(
undefined, Method.Post, "/room_keys/version", undefined, data,
{ prefix: PREFIX_UNSTABLE },
{ prefix: PREFIX_V3 },
);

// We could assume everything's okay and enable directly, but this ensures
Expand Down Expand Up @@ -2888,7 +2888,7 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa

return this.http.authedRequest(
undefined, Method.Delete, path, undefined, undefined,
{ prefix: PREFIX_UNSTABLE },
{ prefix: PREFIX_V3 },
);
}

Expand Down
6 changes: 3 additions & 3 deletions src/crypto/EncryptionSetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { logger } from "../logger";
import { MatrixEvent } from "../models/event";
import { createCryptoStoreCacheCallbacks, ICacheCallbacks } from "./CrossSigning";
import { IndexedDBCryptoStore } from './store/indexeddb-crypto-store';
import { Method, PREFIX_UNSTABLE } from "../http-api";
import { Method, PREFIX_V3 } from "../http-api";
import { Crypto, IBootstrapCrossSigningOpts } from "./index";
import {
ClientEvent,
Expand Down Expand Up @@ -246,14 +246,14 @@ export class EncryptionSetupOperation {
algorithm: this.keyBackupInfo.algorithm,
auth_data: this.keyBackupInfo.auth_data,
},
{ prefix: PREFIX_UNSTABLE },
{ prefix: PREFIX_V3 },
);
} else {
// add new key backup
await baseApis.http.authedRequest(
undefined, Method.Post, "/room_keys/version",
undefined, this.keyBackupInfo,
{ prefix: PREFIX_UNSTABLE },
{ prefix: PREFIX_V3 },
);
}
}
Expand Down