Skip to content

Commit

Permalink
Workaround for turt2liveGH-333
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaSquee committed Aug 6, 2023
1 parent 10eb6b3 commit 6f50591
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/e2ee/RustEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,16 @@ export class RustEngine {

private async processKeysUploadRequest(request: KeysUploadRequest) {
const body = JSON.parse(request.body);
// WORKAROUND GH-333
if (body) {
if (body.device_keys == null) {
delete body.device_keys;
}
if (body.one_time_keys == null || !Object.keys(body.one_time_keys).length) {
delete body.one_time_keys;
}
}
// END OF WORKAROUND
// delete body["one_time_keys"]; // use this to test MSC3983
const resp = await this.client.doRequest("POST", "/_matrix/client/v3/keys/upload", null, body);
await this.machine.markRequestAsSent(request.id, request.type, JSON.stringify(resp));
Expand Down

0 comments on commit 6f50591

Please sign in to comment.