@wireapp/core 31.2.2 → 31.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -3,11 +3,11 @@
3
3
  "./src/main/cryptography/AssetCryptography/crypto.node": "./src/main/cryptography/AssetCryptography/crypto.browser.js"
4
4
  },
5
5
  "dependencies": {
6
- "@wireapp/api-client": "^20.5.6",
6
+ "@wireapp/api-client": "^20.6.1",
7
7
  "@wireapp/commons": "^4.4.6",
8
8
  "@wireapp/core-crypto": "0.5.1",
9
9
  "@wireapp/cryptobox": "12.8.0",
10
- "@wireapp/promise-queue": "^1.2.6",
10
+ "@wireapp/promise-queue": "^1.3.0",
11
11
  "@wireapp/store-engine-dexie": "^1.7.6",
12
12
  "axios": "^0.27.2",
13
13
  "bazinga64": "5.11.6",
@@ -81,6 +81,6 @@
81
81
  "test": "jest",
82
82
  "watch": "tsc ---watch"
83
83
  },
84
- "version": "31.2.2",
85
- "gitHead": "6616575aeeb2017803d5243fe7afb273297997ac"
84
+ "version": "31.3.1",
85
+ "gitHead": "0deb05875d2b6a3045ed58906a6254e28125e81f"
86
86
  }
@@ -482,7 +482,13 @@ class ConversationService {
482
482
  if (!selfUserId) {
483
483
  throw new Error('You need to pass self user qualified id in order to create an MLS conversation');
484
484
  }
485
- await this.mlsService.createConversation(groupIdDecodedFromBase64);
485
+ const mlsKeys = (await this.apiClient.api.client.getPublicKeys()).removal;
486
+ const mlsKeyBytes = Object.values(mlsKeys).map((key) => bazinga64_1.Decoder.fromBase64(key).asBytes);
487
+ const config = {
488
+ externalSenders: mlsKeyBytes,
489
+ ciphersuite: 1, // TODO: Use the correct ciphersuite enum.
490
+ };
491
+ await this.mlsService.createConversation(groupIdDecodedFromBase64, config);
486
492
  const coreCryptoKeyPackagesPayload = await this.mlsService.getKeyPackagesPayload([
487
493
  {
488
494
  id: selfUserId.id,
@@ -495,7 +501,10 @@ class ConversationService {
495
501
  },
496
502
  ...qualifiedUsers,
497
503
  ]);
498
- const response = await this.mlsService.addUsersToExistingConversation(groupIdDecodedFromBase64, coreCryptoKeyPackagesPayload);
504
+ let response;
505
+ if (coreCryptoKeyPackagesPayload.length !== 0) {
506
+ response = await this.mlsService.addUsersToExistingConversation(groupIdDecodedFromBase64, coreCryptoKeyPackagesPayload);
507
+ }
499
508
  //We store the info when conversation (along with key material) was created, so we will know when to renew it
500
509
  const groupCreationTimeStamp = new Date().getTime();
501
510
  await this.notificationService.storeLastKeyMaterialUpdateDate({