@wireapp/core 22.0.0 → 22.1.0

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,17 @@
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
+ # [22.1.0](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/compare/@wireapp/core@22.0.0...@wireapp/core@22.1.0) (2022-02-01)
7
+
8
+
9
+ ### Features
10
+
11
+ * **core:** Enable mismatch hook into broadcast messages ([#4219](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/issues/4219)) ([55d8aad](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/commit/55d8aad4519d708af7ed67a6a591d3f6ccd7f55a))
12
+
13
+
14
+
15
+
16
+
6
17
  # [22.0.0](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/compare/@wireapp/core@21.0.2...@wireapp/core@22.0.0) (2022-01-31)
7
18
 
8
19
 
package/package.json CHANGED
@@ -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": "22.0.0",
73
- "gitHead": "6f85fe1a8bc2dfe0ef0db6dfe094916aa00dc1f7"
72
+ "version": "22.1.0",
73
+ "gitHead": "97061d487f550a9bcb587ae730a61b9c16fbe074"
74
74
  }
@@ -16,5 +16,5 @@ export declare class BroadcastService {
16
16
  * @param onlyDirectConnections=false Will generate a bundle only for directly connected users (users the self user has conversation with). Allows avoiding broadcasting messages to too many people
17
17
  */
18
18
  getPreKeyBundlesFromTeam(teamId: string, skipOwnClients?: boolean, onlyDirectConnections?: boolean): Promise<UserPreKeyBundleMap>;
19
- broadcastGenericMessage(genericMessage: GenericMessage, recipients: UserPreKeyBundleMap | UserClients, sendAsProtobuf?: boolean): Promise<ClientMismatch>;
19
+ broadcastGenericMessage(genericMessage: GenericMessage, recipients: UserPreKeyBundleMap | UserClients, sendAsProtobuf?: boolean, onClientMismatch?: (mismatch: ClientMismatch) => void | boolean | Promise<boolean>): Promise<ClientMismatch>;
20
20
  }
@@ -54,11 +54,12 @@ class BroadcastService {
54
54
  return bundleMap;
55
55
  }, {});
56
56
  }
57
- async broadcastGenericMessage(genericMessage, recipients, sendAsProtobuf) {
57
+ async broadcastGenericMessage(genericMessage, recipients, sendAsProtobuf, onClientMismatch) {
58
58
  const plainTextArray = protocol_messaging_1.GenericMessage.encode(genericMessage).finish();
59
59
  return this.messageService.sendMessage(this.apiClient.validatedClientId, recipients, plainTextArray, {
60
60
  sendAsProtobuf,
61
61
  reportMissing: Object.keys(recipients),
62
+ onClientMismatch,
62
63
  });
63
64
  }
64
65
  }