@wireapp/core 24.1.0 → 24.2.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/CHANGELOG.md CHANGED
@@ -3,6 +3,38 @@
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
+ ## [24.2.1](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/compare/@wireapp/core@24.2.0...@wireapp/core@24.2.1) (2022-03-10)
7
+
8
+ **Note:** Version bump only for package @wireapp/core
9
+
10
+
11
+
12
+
13
+
14
+ # [24.2.0](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/compare/@wireapp/core@24.1.1...@wireapp/core@24.2.0) (2022-03-07)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **core:** Do not use qualified session ids in non-federated env ([#4237](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/issues/4237)) ([ad9e6d0](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/commit/ad9e6d0e903c42674aa7f60038463e3c1dfeb5e4))
20
+
21
+
22
+ ### Features
23
+
24
+ * **api-client:** Send federated broadcast messages ([#4235](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/issues/4235)) ([4e437a5](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/commit/4e437a5c60a0c801d2ce10d802f100d7ac9c6f6b))
25
+
26
+
27
+
28
+
29
+
30
+ ## [24.1.1](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/compare/@wireapp/core@24.1.0...@wireapp/core@24.1.1) (2022-03-01)
31
+
32
+ **Note:** Version bump only for package @wireapp/core
33
+
34
+
35
+
36
+
37
+
6
38
  # [24.1.0](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/compare/@wireapp/core@24.0.3...@wireapp/core@24.1.0) (2022-02-28)
7
39
 
8
40
 
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": "18.1.0",
8
+ "@wireapp/api-client": "18.3.1",
9
9
  "@wireapp/cryptobox": "12.7.1",
10
10
  "bazinga64": "5.10.0",
11
11
  "hash.js": "1.1.7",
@@ -20,14 +20,14 @@
20
20
  "@types/jasmine": "3.8.2",
21
21
  "@types/karma": "6.3.1",
22
22
  "@wireapp/commons": "4.2.13",
23
- "@wireapp/store-engine-dexie": "1.6.8",
23
+ "@wireapp/store-engine-dexie": "1.6.9",
24
24
  "commander": "8.0.0",
25
25
  "cross-env": "7.0.3",
26
26
  "dotenv-defaults": "2.0.2",
27
27
  "faker": "5.5.3",
28
28
  "istanbul": "1.1.0-alpha.1",
29
29
  "jasmine": "3.8.0",
30
- "karma": "6.3.14",
30
+ "karma": "6.3.16",
31
31
  "karma-chrome-launcher": "3.1.0",
32
32
  "karma-jasmine": "4.0.1",
33
33
  "karma-jasmine-diff-reporter": "2.0.1",
@@ -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": "24.1.0",
73
- "gitHead": "0ce72c6da26b91ac8eb61b20bb84e8b5550ab5c2"
72
+ "version": "24.2.1",
73
+ "gitHead": "465adfa14f655b2ec6b0eff97f1a99236fe04297"
74
74
  }
@@ -149,15 +149,20 @@ class Account extends events_1.EventEmitter {
149
149
  return context;
150
150
  }
151
151
  async initServices(storeEngine) {
152
- const config = { useQualifiedIds: this.apiClient.backendFeatures.federationEndpoints };
153
152
  const accountService = new account_1.AccountService(this.apiClient);
154
153
  const assetService = new conversation_1.AssetService(this.apiClient);
155
- const cryptographyService = new cryptography_1.CryptographyService(this.apiClient, storeEngine, config);
154
+ const cryptographyService = new cryptography_1.CryptographyService(this.apiClient, storeEngine, {
155
+ // We want to encrypt with fully qualified session ids, only if the backend is federated with other backends
156
+ useQualifiedIds: this.backendFeatures.isFederated,
157
+ });
156
158
  const clientService = new client_2.ClientService(this.apiClient, storeEngine, cryptographyService);
157
159
  const connectionService = new connection_1.ConnectionService(this.apiClient);
158
160
  const giphyService = new giphy_1.GiphyService(this.apiClient);
159
161
  const linkPreviewService = new linkPreview_1.LinkPreviewService(assetService);
160
- const conversationService = new conversation_1.ConversationService(this.apiClient, cryptographyService, config);
162
+ const conversationService = new conversation_1.ConversationService(this.apiClient, cryptographyService, {
163
+ // We can use qualified ids to send messages as long as the backend supports federated endpoints
164
+ useQualifiedIds: this.backendFeatures.federationEndpoints,
165
+ });
161
166
  const notificationService = new notification_1.NotificationService(this.apiClient, cryptographyService, storeEngine);
162
167
  const selfService = new self_1.SelfService(this.apiClient);
163
168
  const teamService = new team_1.TeamService(this.apiClient);
@@ -162,8 +162,7 @@ class MessageService {
162
162
  protoMessage.ignoreAll = true;
163
163
  }
164
164
  if (!options.conversationId) {
165
- //TODO implement federated broadcast sending
166
- throw new Error('Unimplemented federated broadcast');
165
+ return this.apiClient.api.broadcast.postBroadcastFederatedMessage(sendingClientId, protoMessage);
167
166
  }
168
167
  const { id, domain } = options.conversationId;
169
168
  return this.apiClient.api.conversation.postOTRMessageV2(id, domain, protoMessage);