@wireapp/core 46.32.2 → 46.32.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/lib/Account.d.ts.map +1 -1
- package/lib/Account.js +5 -0
- package/lib/conversation/ConversationService/Utility/getConversationQualifiedMembers.d.ts.map +1 -1
- package/lib/conversation/ConversationService/Utility/getConversationQualifiedMembers.js +6 -3
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/IncomingProposalsQueue/IncomingProposalsQueue.d.ts +5 -0
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/IncomingProposalsQueue/IncomingProposalsQueue.d.ts.map +1 -0
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/IncomingProposalsQueue/IncomingProposalsQueue.js +39 -0
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/IncomingProposalsQueue/index.d.ts +2 -0
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/IncomingProposalsQueue/index.d.ts.map +1 -0
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/IncomingProposalsQueue/index.js +35 -0
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/messageAdd.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/messageAdd.js +13 -6
- package/package.json +7 -7
package/lib/Account.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Account.d.ts","sourceRoot":"","sources":["../src/Account.ts"],"names":[],"mappings":"AAmBA,OAAO,EACL,YAAY,EAGZ,OAAO,EACP,MAAM,EAEN,SAAS,EAEV,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAC,gBAAgB,EAAwB,UAAU,EAAE,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AAErH,OAAO,KAAK,MAAM,MAAM,+BAA+B,CAAC;AAExD,OAAO,EAAC,YAAY,EAAC,MAAM,uCAAuC,CAAC;AACnE,OAAO,EAEL,sBAAsB,EAGvB,MAA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}
|
package/lib/Account.js
CHANGED
|
@@ -67,6 +67,7 @@ const linkPreview_1 = require("./linkPreview");
|
|
|
67
67
|
const mls_1 = require("./messagingProtocols/mls");
|
|
68
68
|
const conversationRejoinQueue_1 = require("./messagingProtocols/mls/conversationRejoinQueue");
|
|
69
69
|
const E2EIdentityService_1 = require("./messagingProtocols/mls/E2EIdentityService");
|
|
70
|
+
const IncomingProposalsQueue_1 = require("./messagingProtocols/mls/EventHandler/events/messageAdd/IncomingProposalsQueue");
|
|
70
71
|
const proteus_1 = require("./messagingProtocols/proteus");
|
|
71
72
|
const CryptoClient_1 = require("./messagingProtocols/proteus/ProteusService/CryptoClient");
|
|
72
73
|
const CoreCryptoWrapper_1 = require("./messagingProtocols/proteus/ProteusService/CryptoClient/CoreCryptoWrapper");
|
|
@@ -491,6 +492,7 @@ class Account extends commons_1.TypedEventEmitter {
|
|
|
491
492
|
* This is to avoid passing proposals too early to core crypto
|
|
492
493
|
* @See WPB-18995
|
|
493
494
|
*/
|
|
495
|
+
(0, IncomingProposalsQueue_1.pauseProposalProcessing)();
|
|
494
496
|
(0, messageSender_1.pauseMessageSending)(); // pause message sending while processing notifications, it will be resumed once the processing is done and we have the marker token
|
|
495
497
|
/**
|
|
496
498
|
* unpause the notification processing queue
|
|
@@ -605,6 +607,7 @@ class Account extends commons_1.TypedEventEmitter {
|
|
|
605
607
|
* if the marker ID matches the current marker ID.
|
|
606
608
|
*/
|
|
607
609
|
if (markerId === currentMarkerId) {
|
|
610
|
+
(0, IncomingProposalsQueue_1.resumeProposalProcessing)();
|
|
608
611
|
(0, messageSender_1.resumeMessageSending)();
|
|
609
612
|
onConnectionStateChanged(ConnectionState.LIVE);
|
|
610
613
|
}
|
|
@@ -664,6 +667,7 @@ class Account extends commons_1.TypedEventEmitter {
|
|
|
664
667
|
createLegacyNotificationStreamProcessor = ({ handleLegacyNotification, handleMissedNotifications, onNotificationStreamProgress, onConnectionStateChanged, }) => {
|
|
665
668
|
return async (abortController) => {
|
|
666
669
|
this.apiClient.transport.ws.lock();
|
|
670
|
+
(0, IncomingProposalsQueue_1.pauseProposalProcessing)();
|
|
667
671
|
(0, messageSender_1.pauseMessageSending)();
|
|
668
672
|
// We want to avoid triggering rejoins of out-of-sync MLS conversations while we are processing the notification stream
|
|
669
673
|
(0, conversationRejoinQueue_1.pauseRejoiningMLSConversations)();
|
|
@@ -681,6 +685,7 @@ class Account extends commons_1.TypedEventEmitter {
|
|
|
681
685
|
void this.notificationProcessingQueue
|
|
682
686
|
.push(async () => {
|
|
683
687
|
this.logger.info(`Resuming message sending. ${(0, messageSender_1.getQueueLength)()} messages to be sent`);
|
|
688
|
+
(0, IncomingProposalsQueue_1.resumeProposalProcessing)();
|
|
684
689
|
(0, messageSender_1.resumeMessageSending)();
|
|
685
690
|
(0, conversationRejoinQueue_1.resumeRejoiningMLSConversations)();
|
|
686
691
|
onConnectionStateChanged(ConnectionState.LIVE);
|
package/lib/conversation/ConversationService/Utility/getConversationQualifiedMembers.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getConversationQualifiedMembers.d.ts","sourceRoot":"","sources":["../../../../src/conversation/ConversationService/Utility/getConversationQualifiedMembers.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,mCAAmC,CAAC;AAC5D,OAAO,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAC;AAEzD,UAAU,MAAM;IACd,SAAS,EAAE,SAAS,CAAC;IACrB,cAAc,EAAE,WAAW,CAAC;CAC7B;AACD,QAAA,MAAM,+BAA+B,kCAAuC,MAAM,KAAG,OAAO,CAAC,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"getConversationQualifiedMembers.d.ts","sourceRoot":"","sources":["../../../../src/conversation/ConversationService/Utility/getConversationQualifiedMembers.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,mCAAmC,CAAC;AAC5D,OAAO,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAC;AAEzD,UAAU,MAAM;IACd,SAAS,EAAE,SAAS,CAAC;IACrB,cAAc,EAAE,WAAW,CAAC;CAC7B;AACD,QAAA,MAAM,+BAA+B,kCAAuC,MAAM,KAAG,OAAO,CAAC,WAAW,EAAE,CAgBzG,CAAC;AAEF,OAAO,EAAC,+BAA+B,EAAC,CAAC"}
|
|
@@ -26,9 +26,12 @@ const getConversationQualifiedMembers = async ({ apiClient, conversationId }) =>
|
|
|
26
26
|
* yourself in the list of users if you want to sync a message also to your
|
|
27
27
|
* other clients.
|
|
28
28
|
*/
|
|
29
|
-
|
|
29
|
+
const filteredConversations = conversation.members.others
|
|
30
30
|
.filter(member => !!member.qualified_id)
|
|
31
|
-
.map(member => member.qualified_id)
|
|
32
|
-
|
|
31
|
+
.map(member => member.qualified_id);
|
|
32
|
+
if (conversation.members.self?.qualified_id) {
|
|
33
|
+
filteredConversations.push(conversation.members.self.qualified_id);
|
|
34
|
+
}
|
|
35
|
+
return filteredConversations;
|
|
33
36
|
};
|
|
34
37
|
exports.getConversationQualifiedMembers = getConversationQualifiedMembers;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Task } from '@wireapp/promise-queue';
|
|
2
|
+
export declare function queueProposal<T>(cb: Task<T>): Promise<T>;
|
|
3
|
+
export declare function resumeProposalProcessing(): void;
|
|
4
|
+
export declare function pauseProposalProcessing(): void;
|
|
5
|
+
//# sourceMappingURL=IncomingProposalsQueue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IncomingProposalsQueue.d.ts","sourceRoot":"","sources":["../../../../../../../src/messagingProtocols/mls/EventHandler/events/messageAdd/IncomingProposalsQueue/IncomingProposalsQueue.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAC,IAAI,EAAe,MAAM,wBAAwB,CAAC;AAM1D,wBAAgB,aAAa,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAGxD;AAED,wBAAgB,wBAAwB,IAAI,IAAI,CAG/C;AAED,wBAAgB,uBAAuB,IAAI,IAAI,CAG9C"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Wire
|
|
4
|
+
* Copyright (C) 2025 Wire Swiss GmbH
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU General Public License as published by
|
|
8
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
* (at your option) any later version.
|
|
10
|
+
*
|
|
11
|
+
* This program is distributed in the hope that it will be useful,
|
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
* GNU General Public License for more details.
|
|
15
|
+
*
|
|
16
|
+
* You should have received a copy of the GNU General Public License
|
|
17
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.queueProposal = queueProposal;
|
|
22
|
+
exports.resumeProposalProcessing = resumeProposalProcessing;
|
|
23
|
+
exports.pauseProposalProcessing = pauseProposalProcessing;
|
|
24
|
+
const commons_1 = require("@wireapp/commons");
|
|
25
|
+
const promise_queue_1 = require("@wireapp/promise-queue");
|
|
26
|
+
const logger = commons_1.LogFactory.getLogger('@wireapp/core/mls/IncomingProposalsQueue');
|
|
27
|
+
const proposalsQueue = new promise_queue_1.PromiseQueue({ name: 'incoming-proposals-queue', paused: true });
|
|
28
|
+
function queueProposal(cb) {
|
|
29
|
+
logger.info('Queueing proposal for processing');
|
|
30
|
+
return proposalsQueue.push(cb);
|
|
31
|
+
}
|
|
32
|
+
function resumeProposalProcessing() {
|
|
33
|
+
logger.info('Resuming proposal processing');
|
|
34
|
+
proposalsQueue.pause(false);
|
|
35
|
+
}
|
|
36
|
+
function pauseProposalProcessing() {
|
|
37
|
+
logger.info('Pausing proposal processing');
|
|
38
|
+
proposalsQueue.pause(true);
|
|
39
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/messagingProtocols/mls/EventHandler/events/messageAdd/IncomingProposalsQueue/index.ts"],"names":[],"mappings":"AAmBA,cAAc,0BAA0B,CAAC"}
|
package/lib/messagingProtocols/mls/EventHandler/events/messageAdd/IncomingProposalsQueue/index.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Wire
|
|
4
|
+
* Copyright (C) 2023 Wire Swiss GmbH
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU General Public License as published by
|
|
8
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
* (at your option) any later version.
|
|
10
|
+
*
|
|
11
|
+
* This program is distributed in the hope that it will be useful,
|
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
* GNU General Public License for more details.
|
|
15
|
+
*
|
|
16
|
+
* You should have received a copy of the GNU General Public License
|
|
17
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
23
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
24
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
25
|
+
}
|
|
26
|
+
Object.defineProperty(o, k2, desc);
|
|
27
|
+
}) : (function(o, m, k, k2) {
|
|
28
|
+
if (k2 === undefined) k2 = k;
|
|
29
|
+
o[k2] = m[k];
|
|
30
|
+
}));
|
|
31
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
32
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
33
|
+
};
|
|
34
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
+
__exportStar(require("./IncomingProposalsQueue"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messageAdd.d.ts","sourceRoot":"","sources":["../../../../../../src/messagingProtocols/mls/EventHandler/events/messageAdd/messageAdd.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,8BAA8B,EAAC,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"messageAdd.d.ts","sourceRoot":"","sources":["../../../../../../src/messagingProtocols/mls/EventHandler/events/messageAdd/messageAdd.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,8BAA8B,EAAC,MAAM,+BAA+B,CAAC;AAQ7E,OAAO,EAAC,mBAAmB,EAAC,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAC,UAAU,EAAuB,MAAM,gCAAgC,CAAC;AAIhF,UAAU,yBAAyB;IACjC,KAAK,EAAE,8BAA8B,CAAC;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,UAAU,CAAC;CACxB;AAED,eAAO,MAAM,mBAAmB,oCAI7B,yBAAyB,KAAG,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAoChE,CAAC"}
|
|
@@ -20,8 +20,11 @@
|
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
21
|
exports.handleMLSMessageAdd = void 0;
|
|
22
22
|
const bazinga64_1 = require("bazinga64");
|
|
23
|
+
const commons_1 = require("@wireapp/commons");
|
|
23
24
|
const protocol_messaging_1 = require("@wireapp/protocol-messaging");
|
|
25
|
+
const IncomingProposalsQueue_1 = require("./IncomingProposalsQueue");
|
|
24
26
|
const MLSService_1 = require("../../../MLSService/MLSService");
|
|
27
|
+
const logger = commons_1.LogFactory.getLogger('@wireapp/core/mls/messageAdd');
|
|
25
28
|
const handleMLSMessageAdd = async ({ event, groupId, mlsService, }) => {
|
|
26
29
|
const encryptedData = bazinga64_1.Decoder.fromBase64(event.data).asBytes;
|
|
27
30
|
const groupIdBytes = bazinga64_1.Decoder.fromBase64(groupId).asBytes;
|
|
@@ -38,12 +41,16 @@ const handleMLSMessageAdd = async ({ event, groupId, mlsService, }) => {
|
|
|
38
41
|
}
|
|
39
42
|
// Check if the message includes proposals
|
|
40
43
|
if (typeof commitDelay === 'number') {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
(0, IncomingProposalsQueue_1.queueProposal)(async () => {
|
|
45
|
+
// we are dealing with a proposal, add a task to process this proposal later on
|
|
46
|
+
// Those proposals are stored inside of coreCrypto and will be handled after a timeout
|
|
47
|
+
await mlsService.handlePendingProposals({
|
|
48
|
+
groupId,
|
|
49
|
+
delayInMs: commitDelay ?? 0,
|
|
50
|
+
eventTime: event.time,
|
|
51
|
+
});
|
|
52
|
+
}).catch(error => {
|
|
53
|
+
logger.error('Failed to process proposal:', error);
|
|
47
54
|
});
|
|
48
55
|
}
|
|
49
56
|
return message ? { event, decryptedData: protocol_messaging_1.GenericMessage.decode(message) } : null;
|
package/package.json
CHANGED
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
"./lib/cryptography/AssetCryptography/crypto.node": "./lib/cryptography/AssetCryptography/crypto.browser.js"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@wireapp/api-client": "^27.73.
|
|
15
|
-
"@wireapp/commons": "^5.4.
|
|
16
|
-
"@wireapp/core-crypto": "7.0.
|
|
14
|
+
"@wireapp/api-client": "^27.73.2",
|
|
15
|
+
"@wireapp/commons": "^5.4.4",
|
|
16
|
+
"@wireapp/core-crypto": "7.0.2",
|
|
17
17
|
"@wireapp/cryptobox": "12.8.0",
|
|
18
18
|
"@wireapp/priority-queue": "^2.1.11",
|
|
19
|
-
"@wireapp/promise-queue": "^2.4.
|
|
19
|
+
"@wireapp/promise-queue": "^2.4.2",
|
|
20
20
|
"@wireapp/protocol-messaging": "1.53.0",
|
|
21
21
|
"@wireapp/store-engine": "^5.1.11",
|
|
22
22
|
"axios": "1.11.0",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"fake-indexeddb": "^5.0.2",
|
|
45
45
|
"jest": "^29.2.1",
|
|
46
46
|
"jest-websocket-mock": "2.5.0",
|
|
47
|
-
"nock": "14.0.
|
|
47
|
+
"nock": "14.0.9",
|
|
48
48
|
"rimraf": "6.0.1",
|
|
49
49
|
"typescript": "^5.0.4"
|
|
50
50
|
},
|
|
@@ -61,6 +61,6 @@
|
|
|
61
61
|
"test:coverage": "jest --coverage",
|
|
62
62
|
"watch": "tsc --watch"
|
|
63
63
|
},
|
|
64
|
-
"version": "46.32.
|
|
65
|
-
"gitHead": "
|
|
64
|
+
"version": "46.32.4",
|
|
65
|
+
"gitHead": "400b95ff2e36395d41b4f3077b3f6531ef41605c"
|
|
66
66
|
}
|