@wireapp/core 46.19.1 → 46.19.2

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.
@@ -301,22 +301,24 @@ class MLSService extends commons_1.TypedEventEmitter {
301
301
  return welcomeBundle.id;
302
302
  }
303
303
  async decryptMessage(conversationId, payload) {
304
- try {
305
- const decryptedMessage = await this.coreCryptoClient.transaction(cx => cx.decryptMessage(conversationId, payload));
306
- this.dispatchNewCrlDistributionPoints(decryptedMessage);
307
- return decryptedMessage;
308
- }
309
- catch (error) {
310
- // According to CoreCrypto JS doc on .decryptMessage method, we should ignore some errors (corecrypto handle them internally)
311
- if ((0, CoreCryptoMLSError_1.shouldMLSDecryptionErrorBeIgnored)(error)) {
312
- return {
313
- hasEpochChanged: false,
314
- isActive: false,
315
- proposals: [],
316
- };
304
+ return await this.coreCryptoClient.transaction(async (cx) => {
305
+ try {
306
+ const decryptedMessage = await cx.decryptMessage(conversationId, payload);
307
+ this.dispatchNewCrlDistributionPoints(decryptedMessage);
308
+ return decryptedMessage;
317
309
  }
318
- throw error;
319
- }
310
+ catch (error) {
311
+ // According to CoreCrypto JS doc on .decryptMessage method, we should ignore some errors (corecrypto handle them internally)
312
+ if ((0, CoreCryptoMLSError_1.shouldMLSDecryptionErrorBeIgnored)(error)) {
313
+ return {
314
+ hasEpochChanged: false,
315
+ isActive: false,
316
+ proposals: [],
317
+ };
318
+ }
319
+ throw error;
320
+ }
321
+ });
320
322
  }
321
323
  async encryptMessage(conversationId, message) {
322
324
  return this.coreCryptoClient.encryptMessage(conversationId, message);
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "./lib/cryptography/AssetCryptography/crypto.node": "./lib/cryptography/AssetCryptography/crypto.browser.js"
12
12
  },
13
13
  "dependencies": {
14
- "@wireapp/api-client": "^27.19.0",
14
+ "@wireapp/api-client": "^27.19.1",
15
15
  "@wireapp/commons": "^5.4.1",
16
16
  "@wireapp/core-crypto": "3.1.0",
17
17
  "@wireapp/cryptobox": "12.8.0",
@@ -61,6 +61,6 @@
61
61
  "test:coverage": "jest --coverage",
62
62
  "watch": "tsc --watch"
63
63
  },
64
- "version": "46.19.1",
65
- "gitHead": "576e5432b6f2fad60f3cdda7a20f32f6c4278b3e"
64
+ "version": "46.19.2",
65
+ "gitHead": "5f707c7f5ef6083ff5a6f438f863e49898c38f2e"
66
66
  }