@wireapp/core 37.0.0 → 37.0.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/lib/Account.d.ts.map +1 -1
- package/lib/Account.js +1 -1
- package/lib/messagingProtocols/common.types.d.ts +3 -0
- package/lib/messagingProtocols/common.types.d.ts.map +1 -0
- package/lib/messagingProtocols/common.types.js +20 -0
- package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/ConversationEvent.d.ts +2 -1
- package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/ConversationEvent.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/events/messageAdd/messageAdd.d.ts +2 -1
- package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/events/messageAdd/messageAdd.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/events/welcomeMessage/welcomeMessage.d.ts +2 -1
- package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/events/welcomeMessage/welcomeMessage.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/EventHandler/EventHandler.d.ts +2 -1
- package/lib/messagingProtocols/mls/EventHandler/EventHandler.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/EventHandler/EventHandler.types.d.ts +0 -2
- package/lib/messagingProtocols/mls/EventHandler/EventHandler.types.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/MLSService/MLSService.d.ts +3 -2
- package/lib/messagingProtocols/mls/MLSService/MLSService.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/MLSService/MLSService.js +1 -1
- package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/ConversationEvent.d.ts +5 -0
- package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/ConversationEvent.d.ts.map +1 -0
- package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/ConversationEvent.js +29 -0
- package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/events/index.d.ts +2 -0
- package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/events/index.d.ts.map +1 -0
- package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/events/index.js +35 -0
- package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/events/otrMessageAdd/index.d.ts +2 -0
- package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/events/otrMessageAdd/index.d.ts.map +1 -0
- package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/events/otrMessageAdd/index.js +35 -0
- package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/events/otrMessageAdd/otrMessageAdd.d.ts +10 -0
- package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/events/otrMessageAdd/otrMessageAdd.d.ts.map +1 -0
- package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/events/otrMessageAdd/otrMessageAdd.js +47 -0
- package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/index.d.ts +2 -0
- package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/index.d.ts.map +1 -0
- package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/index.js +35 -0
- package/lib/messagingProtocols/proteus/EventHandler/EventHandler.d.ts +5 -0
- package/lib/messagingProtocols/proteus/EventHandler/EventHandler.d.ts.map +1 -0
- package/lib/messagingProtocols/proteus/EventHandler/EventHandler.js +24 -0
- package/lib/messagingProtocols/proteus/EventHandler/EventHandler.types.d.ts +11 -0
- package/lib/messagingProtocols/proteus/EventHandler/EventHandler.types.d.ts.map +1 -0
- package/lib/messagingProtocols/proteus/EventHandler/EventHandler.types.js +23 -0
- package/lib/messagingProtocols/proteus/EventHandler/index.d.ts +3 -0
- package/lib/messagingProtocols/proteus/EventHandler/index.d.ts.map +1 -0
- package/lib/messagingProtocols/proteus/EventHandler/index.js +36 -0
- package/lib/messagingProtocols/proteus/ProteusService/ProteusService.d.ts +3 -1
- package/lib/messagingProtocols/proteus/ProteusService/ProteusService.d.ts.map +1 -1
- package/lib/messagingProtocols/proteus/ProteusService/ProteusService.js +5 -7
- package/lib/messagingProtocols/proteus/ProteusService/Utility/index.d.ts +1 -0
- package/lib/messagingProtocols/proteus/ProteusService/Utility/index.d.ts.map +1 -1
- package/lib/messagingProtocols/proteus/ProteusService/Utility/index.js +1 -0
- package/lib/messagingProtocols/proteus/ProteusService/Utility/isClearFromMismatch.d.ts +4 -0
- package/lib/messagingProtocols/proteus/ProteusService/Utility/isClearFromMismatch.d.ts.map +1 -0
- package/lib/messagingProtocols/proteus/ProteusService/Utility/isClearFromMismatch.js +29 -0
- package/lib/notification/NotificationService.d.ts +5 -7
- package/lib/notification/NotificationService.d.ts.map +1 -1
- package/lib/notification/NotificationService.js +13 -24
- package/package.json +2 -2
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,EACV,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAuB,UAAU,EAAE,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AACnG,OAAO,KAAK,MAAM,MAAM,+BAA+B,CAAC;AASxD,OAAO,EAAC,YAAY,EAAC,MAAM,QAAQ,CAAC;AAEpC,OAAO,EAAC,SAAS,EAAE,eAAe,EAAC,MAAM,qBAAqB,CAAC;AAG/D,OAAO,EAAC,UAAU,EAA0C,MAAM,uBAAuB,CAAC;AAE1F,OAAO,EAAC,cAAc,EAAC,MAAM,YAAY,CAAC;AAE1C,OAAO,EAAC,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAC,UAAU,EAAE,aAAa,EAAC,MAAM,WAAW,CAAC;AACpD,OAAO,EAAC,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAChD,OAAO,EAAC,YAAY,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,iBAAiB,EAAC,MAAM,iBAAiB,CAAC;AAE1G,OAAO,KAAK,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AE,UAAU,GAAG,OAAO,CAAC,gBAAgB,CAAC;YAiB9E,eAAe;YA2Cf,cAAc;IA4B5B,OAAO,CAAC,YAAY;IAKpB;;;OAGG;IACU,MAAM,CAAC,SAAS,GAAE,OAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IAS9D;;;;;;OAMG;IACI,MAAM,CAAC,EACZ,OAAkB,EAClB,wBAAmC,EACnC,4BAAuC,EACvC,qBAAgC,EAChC,MAAc,GACf,GAAE;QACD;;;;WAIG;QACH,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,mBAAmB,EAAE,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAC;QAE9E;;WAEG;QACH,4BAA4B,CAAC,EAAE,CAAC,EAAC,IAAI,EAAE,KAAK,EAAC,EAAE;YAAC,IAAI,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAC,KAAK,IAAI,CAAC;QAEtF;;WAEG;QACH,wBAAwB,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;QAE5D;;;;;;WAMG;QACH,qBAAqB,CAAC,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC;QAEzD;;WAEG;QACH,MAAM,CAAC,EAAE,OAAO,CAAC;KACb,GAAG,MAAM,IAAI;IAoFnB,OAAO,CAAC,cAAc;IAKtB,OAAO,CAAC,qBAAqB;YAIf,UAAU;CAqBzB"}
|
package/lib/Account.js
CHANGED
|
@@ -308,7 +308,7 @@ class Account extends events_1.EventEmitter {
|
|
|
308
308
|
const connectionService = new connection_1.ConnectionService(this.apiClient);
|
|
309
309
|
const giphyService = new giphy_1.GiphyService(this.apiClient);
|
|
310
310
|
const linkPreviewService = new linkPreview_1.LinkPreviewService(assetService);
|
|
311
|
-
const notificationService = new notification_1.NotificationService(this.apiClient,
|
|
311
|
+
const notificationService = new notification_1.NotificationService(this.apiClient, mlsService, proteusService, this.storeEngine);
|
|
312
312
|
const conversationService = new conversation_1.ConversationService(this.apiClient, cryptographyService, {
|
|
313
313
|
// We can use qualified ids to send messages as long as the backend supports federated endpoints
|
|
314
314
|
useQualifiedIds: this.backendFeatures.federationEndpoints,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.types.d.ts","sourceRoot":"","sources":["../../src/messagingProtocols/common.types.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,mBAAmB,EAAC,MAAM,iBAAiB,CAAC;AAEpD,oBAAY,kBAAkB,GAAG,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Wire
|
|
4
|
+
* Copyright (C) 2022 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 });
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { EventHandlerParams
|
|
1
|
+
import { EventHandlerParams } from '..';
|
|
2
|
+
import { EventHandlerResult } from '../../../common.types';
|
|
2
3
|
declare const handleConversationEvent: (params: EventHandlerParams) => EventHandlerResult;
|
|
3
4
|
export { handleConversationEvent };
|
|
4
5
|
//# sourceMappingURL=ConversationEvent.d.ts.map
|
package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/ConversationEvent.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConversationEvent.d.ts","sourceRoot":"","sources":["../../../../../src/messagingProtocols/mls/EventHandler/ConversationEvent/ConversationEvent.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAC,kBAAkB,
|
|
1
|
+
{"version":3,"file":"ConversationEvent.d.ts","sourceRoot":"","sources":["../../../../../src/messagingProtocols/mls/EventHandler/ConversationEvent/ConversationEvent.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAC,kBAAkB,EAAC,MAAM,IAAI,CAAC;AACtC,OAAO,EAAC,kBAAkB,EAAC,MAAM,uBAAuB,CAAC;AAIzD,QAAA,MAAM,uBAAuB,WAAkB,kBAAkB,uBAQhE,CAAC;AAEF,OAAO,EAAC,uBAAuB,EAAC,CAAC"}
|
package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/events/messageAdd/messageAdd.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BackendEvent, ConversationMLSMessageAddEvent } from '@wireapp/api-client/lib/event';
|
|
2
2
|
import logdown from 'logdown';
|
|
3
|
-
import {
|
|
3
|
+
import { EventHandlerResult } from '../../../../../common.types';
|
|
4
|
+
import { EventHandlerParams } from '../../../EventHandler.types';
|
|
4
5
|
declare const isMLSMessageAddEvent: (event: BackendEvent) => event is ConversationMLSMessageAddEvent;
|
|
5
6
|
interface HandleMLSMessageAddParams extends EventHandlerParams {
|
|
6
7
|
event: ConversationMLSMessageAddEvent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messageAdd.d.ts","sourceRoot":"","sources":["../../../../../../../src/messagingProtocols/mls/EventHandler/ConversationEvent/events/messageAdd/messageAdd.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,YAAY,EAAE,8BAA8B,EAAqB,MAAM,+BAA+B,CAAC;AAE/G,OAAO,OAAO,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"messageAdd.d.ts","sourceRoot":"","sources":["../../../../../../../src/messagingProtocols/mls/EventHandler/ConversationEvent/events/messageAdd/messageAdd.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,YAAY,EAAE,8BAA8B,EAAqB,MAAM,+BAA+B,CAAC;AAE/G,OAAO,OAAO,MAAM,SAAS,CAAC;AAI9B,OAAO,EAAC,kBAAkB,EAAC,MAAM,6BAA6B,CAAC;AAE/D,OAAO,EAAC,kBAAkB,EAAC,MAAM,6BAA6B,CAAC;AAE/D,QAAA,MAAM,oBAAoB,UAAW,YAAY,4CACE,CAAC;AAEpD,UAAU,yBAA0B,SAAQ,kBAAkB;IAC5D,KAAK,EAAE,8BAA8B,CAAC;IACtC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC;CACxB;AACD,QAAA,MAAM,mBAAmB,kCAAuC,yBAAyB,uBAgDxF,CAAC;AAEF,OAAO,EAAC,oBAAoB,EAAE,mBAAmB,EAAC,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BackendEvent, ConversationMLSWelcomeEvent } from '@wireapp/api-client/lib/event';
|
|
2
|
-
import {
|
|
2
|
+
import { EventHandlerResult } from '../../../../../common.types';
|
|
3
|
+
import { EventHandlerParams } from '../../../EventHandler.types';
|
|
3
4
|
declare const isWelcomeMessageEvent: (event: BackendEvent) => event is ConversationMLSWelcomeEvent;
|
|
4
5
|
interface HandleWelcomeMessageParams extends EventHandlerParams {
|
|
5
6
|
event: ConversationMLSWelcomeEvent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"welcomeMessage.d.ts","sourceRoot":"","sources":["../../../../../../../src/messagingProtocols/mls/EventHandler/ConversationEvent/events/welcomeMessage/welcomeMessage.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,YAAY,EAAE,2BAA2B,EAAqB,MAAM,+BAA+B,CAAC;AAG5G,OAAO,EAAC,kBAAkB,
|
|
1
|
+
{"version":3,"file":"welcomeMessage.d.ts","sourceRoot":"","sources":["../../../../../../../src/messagingProtocols/mls/EventHandler/ConversationEvent/events/welcomeMessage/welcomeMessage.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,YAAY,EAAE,2BAA2B,EAAqB,MAAM,+BAA+B,CAAC;AAG5G,OAAO,EAAC,kBAAkB,EAAC,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAC,kBAAkB,EAAC,MAAM,6BAA6B,CAAC;AAE/D,QAAA,MAAM,qBAAqB,UAAW,YAAY,yCACK,CAAC;AAExD,UAAU,0BAA2B,SAAQ,kBAAkB;IAC7D,KAAK,EAAE,2BAA2B,CAAC;CACpC;AACD,QAAA,MAAM,oBAAoB,0BAA+B,0BAA0B,uBASlF,CAAC;AAEF,OAAO,EAAC,qBAAqB,EAAE,oBAAoB,EAAC,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EventHandlerParams } from './EventHandler.types';
|
|
2
|
+
import { EventHandlerResult } from '../../common.types';
|
|
2
3
|
declare const handleBackendEvent: (params: EventHandlerParams) => EventHandlerResult;
|
|
3
4
|
export { handleBackendEvent };
|
|
4
5
|
//# sourceMappingURL=EventHandler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventHandler.d.ts","sourceRoot":"","sources":["../../../../src/messagingProtocols/mls/EventHandler/EventHandler.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAC,kBAAkB,
|
|
1
|
+
{"version":3,"file":"EventHandler.d.ts","sourceRoot":"","sources":["../../../../src/messagingProtocols/mls/EventHandler/EventHandler.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AAExD,OAAO,EAAC,kBAAkB,EAAC,MAAM,oBAAoB,CAAC;AAEtD,QAAA,MAAM,kBAAkB,WAAkB,kBAAkB,uBAAwD,CAAC;AAErH,OAAO,EAAC,kBAAkB,EAAC,CAAC"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { BackendEvent } from '@wireapp/api-client/lib/event';
|
|
2
2
|
import { PayloadBundleSource } from '../../../conversation';
|
|
3
|
-
import { HandledEventPayload } from '../../../notification';
|
|
4
3
|
import { MLSService } from '../MLSService/MLSService';
|
|
5
4
|
export { BackendEvent, PayloadBundleSource };
|
|
6
|
-
export declare type EventHandlerResult = Promise<HandledEventPayload | void>;
|
|
7
5
|
export declare type EventHandlerParams = {
|
|
8
6
|
mlsService: MLSService;
|
|
9
7
|
event: BackendEvent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventHandler.types.d.ts","sourceRoot":"","sources":["../../../../src/messagingProtocols/mls/EventHandler/EventHandler.types.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,YAAY,EAAC,MAAM,+BAA+B,CAAC;AAE3D,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"EventHandler.types.d.ts","sourceRoot":"","sources":["../../../../src/messagingProtocols/mls/EventHandler/EventHandler.types.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,YAAY,EAAC,MAAM,+BAA+B,CAAC;AAE3D,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAC,UAAU,EAAC,MAAM,0BAA0B,CAAC;AAEpD,OAAO,EAAC,YAAY,EAAE,mBAAmB,EAAC,CAAC;AAE3C,oBAAY,kBAAkB,GAAG;IAC/B,UAAU,EAAE,UAAU,CAAC;IACvB,KAAK,EAAE,YAAY,CAAC;IACpB,MAAM,EAAE,mBAAmB,CAAC;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC"}
|
|
@@ -5,7 +5,8 @@ import { APIClient } from '@wireapp/api-client';
|
|
|
5
5
|
import { AddProposalArgs, ConversationConfiguration, ConversationId, CoreCrypto, DecryptedMessage, ExternalProposalArgs, ExternalProposalType, ExternalRemoveProposalArgs, Invitee, ProposalArgs, ProposalType, RemoveProposalArgs } from '@wireapp/core-crypto';
|
|
6
6
|
import { MLSServiceConfig } from './MLSService.types';
|
|
7
7
|
import { QualifiedUsers } from '../../../conversation';
|
|
8
|
-
import {
|
|
8
|
+
import { EventHandlerResult } from '../../common.types';
|
|
9
|
+
import { EventHandlerParams } from '../EventHandler';
|
|
9
10
|
import { CommitPendingProposalsParams, HandlePendingProposalsParams, MLSCallbacks } from '../types';
|
|
10
11
|
export declare const optionalToUint8Array: (array: Uint8Array | []) => Uint8Array;
|
|
11
12
|
export declare class MLSService {
|
|
@@ -82,7 +83,7 @@ export declare class MLSService {
|
|
|
82
83
|
uploadMLSPublicKeys(publicKey: Uint8Array, clientId: string): Promise<void>;
|
|
83
84
|
uploadMLSKeyPackages(keypackages: Uint8Array[], clientId: string): Promise<void>;
|
|
84
85
|
wipeConversation(conversationId: ConversationId): Promise<void>;
|
|
85
|
-
|
|
86
|
+
handleEvent(params: Omit<EventHandlerParams, 'mlsService'>): EventHandlerResult;
|
|
86
87
|
/**
|
|
87
88
|
* If there is a matching conversationId => groupId pair in the database,
|
|
88
89
|
* we can find the groupId and return it as a string
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MLSService.d.ts","sourceRoot":"","sources":["../../../../src/messagingProtocols/mls/MLSService/MLSService.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,sBAAsB,EAAC,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAC;AAGzD,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EACL,eAAe,EAEf,yBAAyB,EACzB,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EACpB,0BAA0B,EAC1B,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,kBAAkB,EACnB,M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O,CAAC,OAAO,CAAC;IAIpE,2BAA2B,IAAI,OAAO,CAAC,MAAM,CAAC;IAI9C,iBAAiB,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAI9E;;;;OAIG;YACW,gBAAgB;IAgB9B,OAAO,CAAC,sCAAsC;IAI9C;;;OAGG;IACI,uBAAuB,CAAC,OAAO,EAAE,MAAM;IAK9C;;;OAGG;IACI,0BAA0B,CAAC,OAAO,EAAE,MAAM;IAUjD;;;OAGG;IACI,0BAA0B;IASjC;;;OAGG;IACI,8BAA8B;YAQvB,eAAe;IAmB7B;;;;;OAKG;IACU,mBAAmB,CAAC,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM;IAM3D,oBAAoB,CAAC,WAAW,EAAE,UAAU,EAAE,EAAE,QAAQ,EAAE,MAAM;IAOhE,gBAAgB,CAAC,cAAc,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAI/D,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,kBAAkB,EAAE,YAAY,CAAC,GAAG,kBAAkB;IAI5F;;;;;OAKG;IACU,4BAA4B,CAAC,uBAAuB,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC;IAUhG;;;;;;;OAOG;IACU,sBAAsB,CAAC,EAAC,SAAS,EAAE,OAAO,EAAE,SAAS,EAAC,EAAE,4BAA4B;IAoBjG;;;;;OAKG;IACU,sBAAsB,CAAC,EAAC,OAAO,EAAE,UAAkB,EAAC,EAAE,4BAA4B;IAa/F;;;;OAIG;IACU,6BAA6B;CAgB3C"}
|
|
@@ -311,7 +311,7 @@ class MLSService {
|
|
|
311
311
|
async wipeConversation(conversationId) {
|
|
312
312
|
return this.coreCryptoClient.wipeConversation(conversationId);
|
|
313
313
|
}
|
|
314
|
-
async
|
|
314
|
+
async handleEvent(params) {
|
|
315
315
|
return (0, EventHandler_1.handleBackendEvent)(Object.assign(Object.assign({}, params), { mlsService: this }));
|
|
316
316
|
}
|
|
317
317
|
/**
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { EventHandlerParams } from '..';
|
|
2
|
+
import { EventHandlerResult } from '../../../common.types';
|
|
3
|
+
declare const handleConversationEvent: (params: EventHandlerParams) => EventHandlerResult;
|
|
4
|
+
export { handleConversationEvent };
|
|
5
|
+
//# sourceMappingURL=ConversationEvent.d.ts.map
|
package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/ConversationEvent.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConversationEvent.d.ts","sourceRoot":"","sources":["../../../../../src/messagingProtocols/proteus/EventHandler/ConversationEvent/ConversationEvent.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAC,kBAAkB,EAAC,MAAM,IAAI,CAAC;AACtC,OAAO,EAAC,kBAAkB,EAAC,MAAM,uBAAuB,CAAC;AAEzD,QAAA,MAAM,uBAAuB,WAAkB,kBAAkB,uBAKhE,CAAC;AAEF,OAAO,EAAC,uBAAuB,EAAC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Wire
|
|
4
|
+
* Copyright (C) 2022 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.handleConversationEvent = void 0;
|
|
22
|
+
const events_1 = require("./events");
|
|
23
|
+
const handleConversationEvent = async (params) => {
|
|
24
|
+
const { event } = params;
|
|
25
|
+
if ((0, events_1.isOtrMessageAddEvent)(event)) {
|
|
26
|
+
return (0, events_1.handleOtrMessageAdd)(Object.assign(Object.assign({}, params), { event }));
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
exports.handleConversationEvent = handleConversationEvent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/messagingProtocols/proteus/EventHandler/ConversationEvent/events/index.ts"],"names":[],"mappings":"AAmBA,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Wire
|
|
4
|
+
* Copyright (C) 2022 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("./otrMessageAdd"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/messagingProtocols/proteus/EventHandler/ConversationEvent/events/otrMessageAdd/index.ts"],"names":[],"mappings":"AAmBA,cAAc,iBAAiB,CAAC"}
|
package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/events/otrMessageAdd/index.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Wire
|
|
4
|
+
* Copyright (C) 2022 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("./otrMessageAdd"), exports);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BackendEvent, ConversationOtrMessageAddEvent } from '@wireapp/api-client/lib/event';
|
|
2
|
+
import { EventHandlerResult } from '../../../../../common.types';
|
|
3
|
+
import { EventHandlerParams } from '../../../EventHandler.types';
|
|
4
|
+
declare const isOtrMessageAddEvent: (event: BackendEvent) => event is ConversationOtrMessageAddEvent;
|
|
5
|
+
declare type HandleOtrMessageAddParams = Omit<EventHandlerParams, 'event'> & {
|
|
6
|
+
event: ConversationOtrMessageAddEvent;
|
|
7
|
+
};
|
|
8
|
+
declare const handleOtrMessageAdd: ({ cryptographyService, event, source, dryRun, }: HandleOtrMessageAddParams) => EventHandlerResult;
|
|
9
|
+
export { isOtrMessageAddEvent, handleOtrMessageAdd };
|
|
10
|
+
//# sourceMappingURL=otrMessageAdd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"otrMessageAdd.d.ts","sourceRoot":"","sources":["../../../../../../../src/messagingProtocols/proteus/EventHandler/ConversationEvent/events/otrMessageAdd/otrMessageAdd.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,YAAY,EAAE,8BAA8B,EAAqB,MAAM,+BAA+B,CAAC;AAG/G,OAAO,EAAC,kBAAkB,EAAC,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAC,kBAAkB,EAAC,MAAM,6BAA6B,CAAC;AAE/D,QAAA,MAAM,oBAAoB,UAAW,YAAY,4CACE,CAAC;AAEpD,aAAK,yBAAyB,GAAG,IAAI,CAAC,kBAAkB,EAAE,OAAO,CAAC,GAAG;IACnE,KAAK,EAAE,8BAA8B,CAAC;CACvC,CAAC;AACF,QAAA,MAAM,mBAAmB,oDAKtB,yBAAyB,uBAmB3B,CAAC;AAEF,OAAO,EAAC,oBAAoB,EAAE,mBAAmB,EAAC,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Wire
|
|
4
|
+
* Copyright (C) 2022 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.handleOtrMessageAdd = exports.isOtrMessageAddEvent = void 0;
|
|
22
|
+
const event_1 = require("@wireapp/api-client/lib/event");
|
|
23
|
+
const error_1 = require("@wireapp/cryptobox/src/error");
|
|
24
|
+
const isOtrMessageAddEvent = (event) => event.type === event_1.CONVERSATION_EVENT.OTR_MESSAGE_ADD;
|
|
25
|
+
exports.isOtrMessageAddEvent = isOtrMessageAddEvent;
|
|
26
|
+
const handleOtrMessageAdd = async ({ cryptographyService, event, source, dryRun = false, }) => {
|
|
27
|
+
if (dryRun) {
|
|
28
|
+
// In case of a dry run, we do not want to decrypt messages
|
|
29
|
+
// We just return the raw event to the caller
|
|
30
|
+
return { event };
|
|
31
|
+
}
|
|
32
|
+
try {
|
|
33
|
+
const decryptedData = await cryptographyService.decryptMessage(event);
|
|
34
|
+
return {
|
|
35
|
+
mappedEvent: cryptographyService.mapGenericMessage(event, decryptedData, source),
|
|
36
|
+
event,
|
|
37
|
+
decryptedData,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
catch (error) {
|
|
41
|
+
if (error instanceof error_1.DecryptionError) {
|
|
42
|
+
return { event, decryptionError: error };
|
|
43
|
+
}
|
|
44
|
+
return { event, decryptionError: error };
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
exports.handleOtrMessageAdd = handleOtrMessageAdd;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/messagingProtocols/proteus/EventHandler/ConversationEvent/index.ts"],"names":[],"mappings":"AAmBA,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Wire
|
|
4
|
+
* Copyright (C) 2022 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("./ConversationEvent"), exports);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { EventHandlerParams } from './EventHandler.types';
|
|
2
|
+
import { EventHandlerResult } from '../../common.types';
|
|
3
|
+
declare const handleBackendEvent: (params: EventHandlerParams) => EventHandlerResult;
|
|
4
|
+
export { handleBackendEvent };
|
|
5
|
+
//# sourceMappingURL=EventHandler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventHandler.d.ts","sourceRoot":"","sources":["../../../../src/messagingProtocols/proteus/EventHandler/EventHandler.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AAExD,OAAO,EAAC,kBAAkB,EAAC,MAAM,oBAAoB,CAAC;AAEtD,QAAA,MAAM,kBAAkB,WAAkB,kBAAkB,uBAAwD,CAAC;AAErH,OAAO,EAAC,kBAAkB,EAAC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Wire
|
|
4
|
+
* Copyright (C) 2022 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.handleBackendEvent = void 0;
|
|
22
|
+
const ConversationEvent_1 = require("./ConversationEvent");
|
|
23
|
+
const handleBackendEvent = async (params) => (0, ConversationEvent_1.handleConversationEvent)(params);
|
|
24
|
+
exports.handleBackendEvent = handleBackendEvent;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BackendEvent } from '@wireapp/api-client/lib/event';
|
|
2
|
+
import { PayloadBundleSource } from '../../../conversation';
|
|
3
|
+
import { CryptographyService } from '../../../cryptography';
|
|
4
|
+
export { BackendEvent, PayloadBundleSource };
|
|
5
|
+
export declare type EventHandlerParams = {
|
|
6
|
+
dryRun?: boolean;
|
|
7
|
+
event: BackendEvent;
|
|
8
|
+
source: PayloadBundleSource;
|
|
9
|
+
cryptographyService: CryptographyService;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=EventHandler.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventHandler.types.d.ts","sourceRoot":"","sources":["../../../../src/messagingProtocols/proteus/EventHandler/EventHandler.types.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,YAAY,EAAC,MAAM,+BAA+B,CAAC;AAE3D,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAE1D,OAAO,EAAC,YAAY,EAAE,mBAAmB,EAAC,CAAC;AAE3C,oBAAY,kBAAkB,GAAG;IAC/B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,YAAY,CAAC;IACpB,MAAM,EAAE,mBAAmB,CAAC;IAC5B,mBAAmB,EAAE,mBAAmB,CAAC;CAC1C,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Wire
|
|
4
|
+
* Copyright (C) 2022 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.PayloadBundleSource = void 0;
|
|
22
|
+
const conversation_1 = require("../../../conversation");
|
|
23
|
+
Object.defineProperty(exports, "PayloadBundleSource", { enumerable: true, get: function () { return conversation_1.PayloadBundleSource; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/messagingProtocols/proteus/EventHandler/index.ts"],"names":[],"mappings":"AAmBA,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Wire
|
|
4
|
+
* Copyright (C) 2022 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("./EventHandler.types"), exports);
|
|
36
|
+
__exportStar(require("./EventHandler"), exports);
|
|
@@ -3,6 +3,8 @@ import { Conversation } from '@wireapp/api-client/lib/conversation';
|
|
|
3
3
|
import { AddUsersToProteusConversationParams, CreateProteusConversationParams, ProteusServiceConfig, SendProteusMessageParams } from './ProteusService.types';
|
|
4
4
|
import { SendResult } from '../../../conversation';
|
|
5
5
|
import { CryptographyService } from '../../../cryptography';
|
|
6
|
+
import { EventHandlerResult } from '../../common.types';
|
|
7
|
+
import { EventHandlerParams } from '../EventHandler';
|
|
6
8
|
export declare class ProteusService {
|
|
7
9
|
private readonly apiClient;
|
|
8
10
|
private readonly cryptographyService;
|
|
@@ -10,7 +12,7 @@ export declare class ProteusService {
|
|
|
10
12
|
private readonly messageService;
|
|
11
13
|
private readonly logger;
|
|
12
14
|
constructor(apiClient: APIClient, cryptographyService: CryptographyService, config: ProteusServiceConfig);
|
|
13
|
-
|
|
15
|
+
handleEvent(params: Omit<EventHandlerParams, 'cryptographyService'>): EventHandlerResult;
|
|
14
16
|
createConversation({ conversationData, otherUserIds, }: CreateProteusConversationParams): Promise<Conversation>;
|
|
15
17
|
addUsersToConversation({ conversationId, qualifiedUserIds }: AddUsersToProteusConversationParams): Promise<import("@wireapp/api-client/lib/event").ConversationMemberJoinEvent>;
|
|
16
18
|
sendMessage({ userIds, sendAsProtobuf, conversationId, nativePush, targetMode, payload, onClientMismatch, }: SendProteusMessageParams): Promise<SendResult>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProteusService.d.ts","sourceRoot":"","sources":["../../../../src/messagingProtocols/proteus/ProteusService/ProteusService.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,mCAAmC,CAAC;AAC5D,OAAO,
|
|
1
|
+
{"version":3,"file":"ProteusService.d.ts","sourceRoot":"","sources":["../../../../src/messagingProtocols/proteus/ProteusService/ProteusService.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,mCAAmC,CAAC;AAC5D,OAAO,EAAC,YAAY,EAAkB,MAAM,sCAAsC,CAAC;AAGnF,OAAO,EACL,mCAAmC,EACnC,+BAA+B,EAC/B,oBAAoB,EACpB,wBAAwB,EACzB,MAAM,wBAAwB,CAAC;AAIhC,OAAO,EAAqB,UAAU,EAAC,MAAM,uBAAuB,CAAC;AAErE,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAC,kBAAkB,EAAC,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAC,kBAAkB,EAAqB,MAAM,iBAAiB,CAAC;AAEvE,qBAAa,cAAc;IAKvB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IACpC,OAAO,CAAC,QAAQ,CAAC,MAAM;IANzB,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAiB;IAChD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA2C;gBAG/C,SAAS,EAAE,SAAS,EACpB,mBAAmB,EAAE,mBAAmB,EACxC,MAAM,EAAE,oBAAoB;IAKlC,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,kBAAkB,EAAE,qBAAqB,CAAC,GAAG,kBAAkB;IAIxF,kBAAkB,CAAC,EAC9B,gBAAgB,EAChB,YAAY,GACb,EAAE,+BAA+B,GAAG,OAAO,CAAC,YAAY,CAAC;IAoB7C,sBAAsB,CAAC,EAAC,cAAc,EAAE,gBAAgB,EAAC,EAAE,mCAAmC;IAI9F,WAAW,CAAC,EACvB,OAAO,EACP,cAAc,EACd,cAAc,EACd,UAAU,EACV,UAAU,EACV,OAAO,EACP,gBAAgB,GACjB,EAAE,wBAAwB,GAAG,OAAO,CAAC,UAAU,CAAC;CA0ClD"}
|
|
@@ -23,9 +23,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
23
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
24
|
exports.ProteusService = void 0;
|
|
25
25
|
const logdown_1 = __importDefault(require("logdown"));
|
|
26
|
+
const Utility_1 = require("./Utility");
|
|
26
27
|
const getGenericMessageParams_1 = require("./Utility/getGenericMessageParams");
|
|
27
28
|
const conversation_1 = require("../../../conversation");
|
|
28
29
|
const MessageService_1 = require("../../../conversation/message/MessageService");
|
|
30
|
+
const EventHandler_1 = require("../EventHandler");
|
|
29
31
|
class ProteusService {
|
|
30
32
|
constructor(apiClient, cryptographyService, config) {
|
|
31
33
|
this.apiClient = apiClient;
|
|
@@ -34,12 +36,8 @@ class ProteusService {
|
|
|
34
36
|
this.logger = (0, logdown_1.default)('@wireapp/core/ProteusService');
|
|
35
37
|
this.messageService = new MessageService_1.MessageService(this.apiClient, this.cryptographyService);
|
|
36
38
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
const hasDeleted = Object.keys(mismatch.deleted || {}).length > 0;
|
|
40
|
-
const hasRedundant = Object.keys(mismatch.redundant || {}).length > 0;
|
|
41
|
-
const hasFailed = Object.keys(mismatch.failed_to_send || {}).length > 0;
|
|
42
|
-
return !hasMissing && !hasDeleted && !hasRedundant && !hasFailed;
|
|
39
|
+
async handleEvent(params) {
|
|
40
|
+
return (0, EventHandler_1.handleBackendEvent)(Object.assign(Object.assign({}, params), { cryptographyService: this.cryptographyService }));
|
|
43
41
|
}
|
|
44
42
|
async createConversation({ conversationData, otherUserIds, }) {
|
|
45
43
|
const isNewConversation = (conversationData) => conversationData && (conversationData === null || conversationData === void 0 ? void 0 : conversationData.name) && (conversationData === null || conversationData === void 0 ? void 0 : conversationData.users);
|
|
@@ -81,7 +79,7 @@ class ProteusService {
|
|
|
81
79
|
? await this.messageService.sendFederatedMessage(sendingClientId, recipients, plainText, Object.assign(Object.assign({}, options), { onClientMismatch: mismatch => onClientMismatch === null || onClientMismatch === void 0 ? void 0 : onClientMismatch(mismatch, false) }))
|
|
82
80
|
: await this.messageService.sendMessage(sendingClientId, recipients, plainText, Object.assign(Object.assign({}, options), { sendAsProtobuf, onClientMismatch: mismatch => onClientMismatch === null || onClientMismatch === void 0 ? void 0 : onClientMismatch(mismatch, false) }));
|
|
83
81
|
if (!response.errored) {
|
|
84
|
-
if (!
|
|
82
|
+
if (!(0, Utility_1.isClearFromMismatch)(response)) {
|
|
85
83
|
// We warn the consumer that there is a mismatch that did not prevent message sending
|
|
86
84
|
await (onClientMismatch === null || onClientMismatch === void 0 ? void 0 : onClientMismatch(response, true));
|
|
87
85
|
}
|
|
@@ -2,4 +2,5 @@ export * from './PreKeyBundle';
|
|
|
2
2
|
export * from '../../../../conversation/ConversationService/Utility/getConversationQualifiedMembers';
|
|
3
3
|
export * from './UserIds';
|
|
4
4
|
export * from './Recipients';
|
|
5
|
+
export * from './isClearFromMismatch';
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/messagingProtocols/proteus/ProteusService/Utility/index.ts"],"names":[],"mappings":"AAmBA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sFAAsF,CAAC;AACrG,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/messagingProtocols/proteus/ProteusService/Utility/index.ts"],"names":[],"mappings":"AAmBA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sFAAsF,CAAC;AACrG,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC"}
|
|
@@ -36,3 +36,4 @@ __exportStar(require("./PreKeyBundle"), exports);
|
|
|
36
36
|
__exportStar(require("../../../../conversation/ConversationService/Utility/getConversationQualifiedMembers"), exports);
|
|
37
37
|
__exportStar(require("./UserIds"), exports);
|
|
38
38
|
__exportStar(require("./Recipients"), exports);
|
|
39
|
+
__exportStar(require("./isClearFromMismatch"), exports);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ClientMismatch, MessageSendingStatus } from '@wireapp/api-client/lib/conversation';
|
|
2
|
+
declare const isClearFromMismatch: (mismatch: ClientMismatch | MessageSendingStatus) => boolean;
|
|
3
|
+
export { isClearFromMismatch };
|
|
4
|
+
//# sourceMappingURL=isClearFromMismatch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isClearFromMismatch.d.ts","sourceRoot":"","sources":["../../../../../src/messagingProtocols/proteus/ProteusService/Utility/isClearFromMismatch.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,cAAc,EAAE,oBAAoB,EAAC,MAAM,sCAAsC,CAAC;AAE1F,QAAA,MAAM,mBAAmB,aAAc,cAAc,GAAG,oBAAoB,KAAG,OAM9E,CAAC;AAEF,OAAO,EAAC,mBAAmB,EAAC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Wire
|
|
4
|
+
* Copyright (C) 2022 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.isClearFromMismatch = void 0;
|
|
22
|
+
const isClearFromMismatch = (mismatch) => {
|
|
23
|
+
const hasMissing = Object.keys(mismatch.missing || {}).length > 0;
|
|
24
|
+
const hasDeleted = Object.keys(mismatch.deleted || {}).length > 0;
|
|
25
|
+
const hasRedundant = Object.keys(mismatch.redundant || {}).length > 0;
|
|
26
|
+
const hasFailed = Object.keys(mismatch.failed_to_send || {}).length > 0;
|
|
27
|
+
return !hasMissing && !hasDeleted && !hasRedundant && !hasFailed;
|
|
28
|
+
};
|
|
29
|
+
exports.isClearFromMismatch = isClearFromMismatch;
|
|
@@ -2,22 +2,20 @@
|
|
|
2
2
|
import * as Events from '@wireapp/api-client/lib/event';
|
|
3
3
|
import { Notification } from '@wireapp/api-client/lib/notification/';
|
|
4
4
|
import { AbortHandler } from '@wireapp/api-client/lib/tcp';
|
|
5
|
+
import { DecryptionError } from '@wireapp/cryptobox/src/error';
|
|
5
6
|
import { EventEmitter } from 'events';
|
|
6
7
|
import { APIClient } from '@wireapp/api-client';
|
|
7
8
|
import { GenericMessage } from '@wireapp/protocol-messaging';
|
|
8
9
|
import { CRUDEngine } from '@wireapp/store-engine';
|
|
9
10
|
import { PayloadBundle, PayloadBundleSource } from '../conversation';
|
|
10
11
|
import { NotificationError } from '../CoreError';
|
|
11
|
-
import { CryptographyService } from '../cryptography';
|
|
12
12
|
import { MLSService } from '../messagingProtocols/mls';
|
|
13
|
+
import { ProteusService } from '../messagingProtocols/proteus';
|
|
13
14
|
export declare type HandledEventPayload = {
|
|
14
15
|
event: Events.BackendEvent;
|
|
15
16
|
mappedEvent?: PayloadBundle;
|
|
16
17
|
decryptedData?: GenericMessage;
|
|
17
|
-
decryptionError?:
|
|
18
|
-
code: number;
|
|
19
|
-
message: string;
|
|
20
|
-
};
|
|
18
|
+
decryptionError?: DecryptionError;
|
|
21
19
|
};
|
|
22
20
|
declare enum TOPIC {
|
|
23
21
|
NOTIFICATION_ERROR = "NotificationService.TOPIC.NOTIFICATION_ERROR"
|
|
@@ -31,13 +29,13 @@ export interface NotificationService {
|
|
|
31
29
|
}
|
|
32
30
|
export declare class NotificationService extends EventEmitter {
|
|
33
31
|
private readonly mlsService;
|
|
32
|
+
private readonly proteusService;
|
|
34
33
|
private readonly apiClient;
|
|
35
34
|
private readonly backend;
|
|
36
|
-
private readonly cryptographyService;
|
|
37
35
|
private readonly database;
|
|
38
36
|
private readonly logger;
|
|
39
37
|
static readonly TOPIC: typeof TOPIC;
|
|
40
|
-
constructor(apiClient: APIClient,
|
|
38
|
+
constructor(apiClient: APIClient, mlsService: MLSService, proteusService: ProteusService, storeEngine: CRUDEngine);
|
|
41
39
|
private getAllNotifications;
|
|
42
40
|
/** Should only be called with a completely new client. */
|
|
43
41
|
initializeNotificationStream(): Promise<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationService.d.ts","sourceRoot":"","sources":["../../src/notification/NotificationService.ts"],"names":[],"mappings":";AAmBA,OAAO,KAAK,MAAM,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAC,YAAY,EAAC,MAAM,uCAAuC,CAAC;AACnE,OAAO,EAAC,YAAY,EAAC,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"NotificationService.d.ts","sourceRoot":"","sources":["../../src/notification/NotificationService.ts"],"names":[],"mappings":";AAmBA,OAAO,KAAK,MAAM,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAC,YAAY,EAAC,MAAM,uCAAuC,CAAC;AACnE,OAAO,EAAC,YAAY,EAAC,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;A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xD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAiC;IAC1D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAGpB;IACH,gBAAuB,KAAK,eAAS;gBAGnC,SAAS,EAAE,SAAS,EACH,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,cAAc,EAC/C,WAAW,EAAE,UAAU;YAQX,mBAAmB;IAKjC,0DAA0D;IAC7C,4BAA4B,IAAI,OAAO,CAAC,MAAM,CAAC;IAO/C,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC;IAKpC,wBAAwB,IAAI,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC;IAIpD,gBAAgB,CAAC,SAAS,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAsBhD,qBAAqB,CAAC,gBAAgB,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC;IAItE,yBAAyB,CACpC,mBAAmB,EAAE,mBAAmB,EACxC,qBAAqB,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,EACvD,YAAY,EAAE,YAAY,GACzB,OAAO,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAC,CAAC;IAoC3D;;;;;;;OAOG;IACH,OAAO,CAAC,eAAe;IAYT,kBAAkB,CAC9B,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,mBAAmB,EAC3B,MAAM,GAAE,OAAe,GACtB,cAAc,CAAC,mBAAmB,CAAC;IAsCtC,OAAO,CAAC,oBAAoB;IAmB5B;;;;;;OAMG;YACW,WAAW;CAkD1B"}
|
|
@@ -72,15 +72,15 @@ var TOPIC;
|
|
|
72
72
|
TOPIC["NOTIFICATION_ERROR"] = "NotificationService.TOPIC.NOTIFICATION_ERROR";
|
|
73
73
|
})(TOPIC || (TOPIC = {}));
|
|
74
74
|
class NotificationService extends events_1.EventEmitter {
|
|
75
|
-
constructor(apiClient,
|
|
75
|
+
constructor(apiClient, mlsService, proteusService, storeEngine) {
|
|
76
76
|
super();
|
|
77
77
|
this.mlsService = mlsService;
|
|
78
|
+
this.proteusService = proteusService;
|
|
78
79
|
this.logger = (0, logdown_1.default)('@wireapp/core/NotificationService', {
|
|
79
80
|
logger: console,
|
|
80
81
|
markdown: false,
|
|
81
82
|
});
|
|
82
83
|
this.apiClient = apiClient;
|
|
83
|
-
this.cryptographyService = cryptographyService;
|
|
84
84
|
this.backend = new NotificationBackendRepository_1.NotificationBackendRepository(this.apiClient);
|
|
85
85
|
this.database = new NotificationDatabaseRepository_1.NotificationDatabaseRepository(storeEngine);
|
|
86
86
|
}
|
|
@@ -237,31 +237,20 @@ class NotificationService extends events_1.EventEmitter {
|
|
|
237
237
|
async handleEvent(event, source, dryRun = false) {
|
|
238
238
|
var _a;
|
|
239
239
|
// Handle MLS Events
|
|
240
|
-
const
|
|
241
|
-
if (
|
|
242
|
-
return
|
|
240
|
+
const mlsResult = await this.mlsService.handleEvent({ event, source, dryRun });
|
|
241
|
+
if (mlsResult) {
|
|
242
|
+
return mlsResult;
|
|
243
|
+
}
|
|
244
|
+
const proteusResult = await this.proteusService.handleEvent({
|
|
245
|
+
event,
|
|
246
|
+
source,
|
|
247
|
+
dryRun,
|
|
248
|
+
});
|
|
249
|
+
if (proteusResult) {
|
|
250
|
+
return proteusResult;
|
|
243
251
|
}
|
|
244
252
|
// Fallback to other events
|
|
245
253
|
switch (event.type) {
|
|
246
|
-
// Encrypted Proteus events
|
|
247
|
-
case Events.CONVERSATION_EVENT.OTR_MESSAGE_ADD: {
|
|
248
|
-
if (dryRun) {
|
|
249
|
-
// In case of a dry run, we do not want to decrypt messages
|
|
250
|
-
// We just return the raw event to the caller
|
|
251
|
-
return { event };
|
|
252
|
-
}
|
|
253
|
-
try {
|
|
254
|
-
const decryptedData = await this.cryptographyService.decryptMessage(event);
|
|
255
|
-
return {
|
|
256
|
-
mappedEvent: this.cryptographyService.mapGenericMessage(event, decryptedData, source),
|
|
257
|
-
event,
|
|
258
|
-
decryptedData,
|
|
259
|
-
};
|
|
260
|
-
}
|
|
261
|
-
catch (error) {
|
|
262
|
-
return { event, decryptionError: error };
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
254
|
// Meta events
|
|
266
255
|
case Events.CONVERSATION_EVENT.MEMBER_JOIN:
|
|
267
256
|
// As of today (07/07/2022) the backend sends `WELCOME` message to the user's own conversation (not the actual conversation that the welcome should be part of)
|
package/package.json
CHANGED