@wireapp/core 24.0.2 → 24.1.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,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
|
+
## [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)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @wireapp/core
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [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)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **core:** Allow sending broadcast message to federated env ([#4234](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/issues/4234)) ([ee66d4d](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/commit/ee66d4d269d0af9fdd72d9a20fdfa4cab884cf8d))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [24.0.3](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/compare/@wireapp/core@24.0.2...@wireapp/core@24.0.3) (2022-02-25)
|
|
26
|
+
|
|
27
|
+
**Note:** Version bump only for package @wireapp/core
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
6
33
|
## [24.0.2](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/compare/@wireapp/core@24.0.1...@wireapp/core@24.0.2) (2022-02-24)
|
|
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": "18.0
|
|
8
|
+
"@wireapp/api-client": "18.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": "24.
|
|
73
|
-
"gitHead": "
|
|
72
|
+
"version": "24.1.1",
|
|
73
|
+
"gitHead": "34c3008f9086e61fa837715618c8c18178b2e5a7"
|
|
74
74
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { APIClient } from '@wireapp/api-client';
|
|
2
|
-
import { ClientMismatch, UserClients } from '@wireapp/api-client/src/conversation';
|
|
2
|
+
import { ClientMismatch, MessageSendingStatus, QualifiedUserClients, UserClients } from '@wireapp/api-client/src/conversation';
|
|
3
3
|
import type { UserPreKeyBundleMap } from '@wireapp/api-client/src/user/';
|
|
4
4
|
import { GenericMessage } from '@wireapp/protocol-messaging';
|
|
5
5
|
import type { CryptographyService } from '../cryptography/';
|
|
@@ -16,5 +16,9 @@ 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, onClientMismatch?: (mismatch: ClientMismatch) => void | boolean | Promise<boolean>): Promise<
|
|
19
|
+
broadcastGenericMessage(genericMessage: GenericMessage, recipients: UserPreKeyBundleMap | UserClients | QualifiedUserClients, sendAsProtobuf?: boolean, onClientMismatch?: (mismatch: ClientMismatch | MessageSendingStatus) => void | boolean | Promise<boolean>): Promise<(MessageSendingStatus & {
|
|
20
|
+
errored?: boolean | undefined;
|
|
21
|
+
}) | (ClientMismatch & {
|
|
22
|
+
errored?: boolean | undefined;
|
|
23
|
+
})>;
|
|
20
24
|
}
|
|
@@ -21,6 +21,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
21
21
|
exports.BroadcastService = void 0;
|
|
22
22
|
const protocol_messaging_1 = require("@wireapp/protocol-messaging");
|
|
23
23
|
const MessageService_1 = require("../conversation/message/MessageService");
|
|
24
|
+
const UserClientsUtil_1 = require("../conversation/message/UserClientsUtil");
|
|
25
|
+
const util_1 = require("../util");
|
|
24
26
|
class BroadcastService {
|
|
25
27
|
constructor(apiClient, cryptographyService) {
|
|
26
28
|
this.apiClient = apiClient;
|
|
@@ -56,11 +58,16 @@ class BroadcastService {
|
|
|
56
58
|
}
|
|
57
59
|
async broadcastGenericMessage(genericMessage, recipients, sendAsProtobuf, onClientMismatch) {
|
|
58
60
|
const plainTextArray = protocol_messaging_1.GenericMessage.encode(genericMessage).finish();
|
|
59
|
-
return
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
return (0, util_1.isQualifiedUserClients)(recipients)
|
|
62
|
+
? this.messageService.sendFederatedMessage(this.apiClient.validatedClientId, recipients, plainTextArray, {
|
|
63
|
+
reportMissing: (0, UserClientsUtil_1.flattenQualifiedUserClients)(recipients).map(({ userId }) => userId),
|
|
64
|
+
onClientMismatch,
|
|
65
|
+
})
|
|
66
|
+
: this.messageService.sendMessage(this.apiClient.validatedClientId, recipients, plainTextArray, {
|
|
67
|
+
sendAsProtobuf,
|
|
68
|
+
reportMissing: Object.keys(recipients),
|
|
69
|
+
onClientMismatch,
|
|
70
|
+
});
|
|
64
71
|
}
|
|
65
72
|
}
|
|
66
73
|
exports.BroadcastService = BroadcastService;
|