@wireapp/core 20.0.2 → 20.1.3

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,47 @@
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
+ ## [20.1.3](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/compare/@wireapp/core@20.1.2...@wireapp/core@20.1.3) (2021-12-16)
7
+
8
+ **Note:** Version bump only for package @wireapp/core
9
+
10
+
11
+
12
+
13
+
14
+ ## [20.1.2](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/compare/@wireapp/core@20.1.1...@wireapp/core@20.1.2) (2021-12-15)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **core:** Await for mismatch handling before considering a message sent ([925ecbb](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/commit/925ecbb9f9a8e5f0f123d29615a794d7c58f2f10))
20
+
21
+
22
+
23
+
24
+
25
+ ## [20.1.1](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/compare/@wireapp/core@20.1.0...@wireapp/core@20.1.1) (2021-12-14)
26
+
27
+
28
+ ### Bug Fixes
29
+
30
+ * **core:** Call message send success callback after mismatch handling ([ada3fd1](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/commit/ada3fd1378a7c5fecddd03db9547a89f90a7a174))
31
+
32
+
33
+
34
+
35
+
36
+ # [20.1.0](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/compare/@wireapp/core@20.0.2...@wireapp/core@20.1.0) (2021-12-14)
37
+
38
+
39
+ ### Features
40
+
41
+ * **core:** Add tweet metadata on linkPreview when needed ([dc84806](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/commit/dc848068e155aed22415827f3dcbeb3992e9c790))
42
+
43
+
44
+
45
+
46
+
6
47
  ## [20.0.2](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/compare/@wireapp/core@20.0.1...@wireapp/core@20.0.2) (2021-12-09)
7
48
 
8
49
  **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": "16.1.0",
8
+ "@wireapp/api-client": "16.2.0",
9
9
  "@wireapp/cryptobox": "12.7.1",
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": "20.0.2",
73
- "gitHead": "34e17094bdbf142c28dc09726427dd6ac197a48a"
72
+ "version": "20.1.3",
73
+ "gitHead": "6470b37490179eadfe0ae855726c7945931fa54f"
74
74
  }
@@ -686,11 +686,11 @@ class ConversationService {
686
686
  onClientMismatch: callbacks === null || callbacks === void 0 ? void 0 : callbacks.onClientMismatch,
687
687
  });
688
688
  if (!response.errored) {
689
- (_b = callbacks === null || callbacks === void 0 ? void 0 : callbacks.onSuccess) === null || _b === void 0 ? void 0 : _b.call(callbacks, genericMessage, response.time);
690
689
  if (!this.isClearFromMismatch(response)) {
691
690
  // We warn the consumer that there is a mismatch that did not prevent message sending
692
- (_c = callbacks === null || callbacks === void 0 ? void 0 : callbacks.onClientMismatch) === null || _c === void 0 ? void 0 : _c.call(callbacks, response, true);
691
+ await ((_b = callbacks === null || callbacks === void 0 ? void 0 : callbacks.onClientMismatch) === null || _b === void 0 ? void 0 : _b.call(callbacks, response, true));
693
692
  }
693
+ (_c = callbacks === null || callbacks === void 0 ? void 0 : callbacks.onSuccess) === null || _c === void 0 ? void 0 : _c.call(callbacks, genericMessage, response.time);
694
694
  }
695
695
  return Object.assign(Object.assign({}, payloadBundle), { content: processedContent || payloadBundle.content, messageTimer: ((_d = genericMessage.ephemeral) === null || _d === void 0 ? void 0 : _d.expireAfterMillis) || 0, state: response.errored ? conversation_2.PayloadBundleState.CANCELLED : conversation_2.PayloadBundleState.OUTGOING_SENT });
696
696
  }
@@ -37,6 +37,7 @@ class MessageToProtoMapper {
37
37
  author: linkPreview.tweet.author,
38
38
  username: linkPreview.tweet.username,
39
39
  });
40
+ linkPreviewMessage.metaData = 'tweet';
40
41
  }
41
42
  if (linkPreview.imageUploaded) {
42
43
  const { asset, image } = linkPreview.imageUploaded;