@wireapp/core 27.2.1 → 27.2.4

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/CHANGELOG.md CHANGED
@@ -3,6 +3,33 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [27.2.4](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/compare/@wireapp/core@27.2.3...@wireapp/core@27.2.4) (2022-06-01)
7
+
8
+ **Note:** Version bump only for package @wireapp/core
9
+
10
+
11
+
12
+
13
+
14
+ ## [27.2.3](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/compare/@wireapp/core@27.2.2...@wireapp/core@27.2.3) (2022-05-31)
15
+
16
+ **Note:** Version bump only for package @wireapp/core
17
+
18
+
19
+
20
+
21
+
22
+ ## [27.2.2](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/compare/@wireapp/core@27.2.1...@wireapp/core@27.2.2) (2022-05-31)
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * Ensure websocket messages are not handled while handling notification stream ([#4277](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/issues/4277)) ([e858923](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/commit/e858923b13d47accf95c31881aeae4c370c73dbb))
28
+
29
+
30
+
31
+
32
+
6
33
  ## [27.2.1](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/compare/@wireapp/core@27.2.0...@wireapp/core@27.2.1) (2022-05-31)
7
34
 
8
35
  **Note:** Version bump only for package @wireapp/core
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "dependencies": {
6
6
  "@types/long": "4.0.1",
7
7
  "@types/node": "~14",
8
- "@wireapp/api-client": "19.3.1",
8
+ "@wireapp/api-client": "19.3.3",
9
9
  "@wireapp/cryptobox": "12.8.0",
10
10
  "bazinga64": "5.10.0",
11
11
  "hash.js": "1.1.7",
@@ -69,6 +69,6 @@
69
69
  "test:project": "yarn dist && yarn test",
70
70
  "test:node": "nyc jasmine --config=jasmine.json"
71
71
  },
72
- "version": "27.2.1",
73
- "gitHead": "97d45ca6fbd2c9f72871882b3cd0b92b26d49cf3"
72
+ "version": "27.2.4",
73
+ "gitHead": "e52c25ffa3377135de1efbb3e45129b89279b16d"
74
74
  }
@@ -329,10 +329,14 @@ class Account extends events_1.EventEmitter {
329
329
  this.apiClient.transport.ws.on(tcp_1.WebSocketClient.TOPIC.ON_MESSAGE, notification => handleNotification(notification, conversation_1.PayloadBundleSource.WEBSOCKET));
330
330
  this.apiClient.transport.ws.on(tcp_1.WebSocketClient.TOPIC.ON_STATE_CHANGE, onConnectionStateChanged);
331
331
  const onBeforeConnect = async () => {
332
+ // Lock websocket in order to buffer any message that arrives while we handle the notification stream
333
+ this.apiClient.transport.ws.lock();
332
334
  await this.service.notification.handleNotificationStream(async (notification, source, progress) => {
333
335
  await handleNotification(notification, source);
334
336
  onNotificationStreamProgress(progress);
335
337
  }, onMissedNotifications);
338
+ // We can now unlock the websocket and let the new messages being handled and decrypted
339
+ this.apiClient.transport.ws.unlock();
336
340
  onConnected();
337
341
  };
338
342
  await this.apiClient.connect(onBeforeConnect);