@wireapp/core 46.31.8 → 46.32.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 CHANGED
@@ -164,7 +164,7 @@ export declare class Account extends TypedEventEmitter<Events> {
164
164
  /**
165
165
  * Will register a new client for the current user
166
166
  */
167
- registerClient: (loginData: LoginData, clientInfo?: ClientInfo, entropyData?: Uint8Array) => Promise<RegisteredClient>;
167
+ registerClient: (loginData: LoginData, clientInfo: ClientInfo | undefined, useLegacyNotificationStream: boolean, entropyData?: Uint8Array) => Promise<RegisteredClient>;
168
168
  getLocalClient(): Promise<import("./client/ClientService").MetaClient | undefined> | undefined;
169
169
  /**
170
170
  * Will initiate all the cryptographic material of the given registered device and setup all the background tasks.
@@ -212,7 +212,7 @@ export declare class Account extends TypedEventEmitter<Events> {
212
212
  * @param callbacks callbacks that will be called to handle different events
213
213
  * @returns close a function that will disconnect from the websocket
214
214
  */
215
- listen: ({ onEvent, onConnectionStateChanged: onConnectionStateChangedCallBack, onNotificationStreamProgress, onMissedNotifications, dryRun, }?: {
215
+ listen: ({ useLegacy, onEvent, onConnectionStateChanged: onConnectionStateChangedCallBack, onNotificationStreamProgress, onMissedNotifications, dryRun, }?: {
216
216
  /**
217
217
  * Called when a new event arrives from backend
218
218
  * @param payload the payload of the event. Contains the raw event received and the decrypted data (if event was encrypted)
@@ -235,6 +235,10 @@ export declare class Account extends TypedEventEmitter<Events> {
235
235
  * @param {string} notificationId
236
236
  */
237
237
  onMissedNotifications?: (notificationId: string) => void;
238
+ /**
239
+ * When set to true, will use the legacy notification stream instead of the new async notifications.
240
+ */
241
+ useLegacy?: boolean;
238
242
  /**
239
243
  * When set will not decrypt and not store the last notification ID. This is useful if you only want to subscribe to unencrypted backend events
240
244
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Account.d.ts","sourceRoot":"","sources":["../src/Account.ts"],"names":[],"mappings":"AAmBA,OAAO,EACL,YAAY,EAGZ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;IACH,OAAO,CAAC,sCAAsC,CAU5C;IAEF;;;;;;;;;;OAUG;IACH,OAAO,CAAC,uCAAuC,CA4C7C;IAEF;;;;;OAKG;IACH,OAAO,CAAC,8BAA8B,CAIpC;IAEF;;;;;;OAMG;IACH,OAAO,CAAC,uBAAuB,CA+B7B;IAEF;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,OAAO,CAAC,yBAAyB,CAa/B;IAEK,qBAAqB,2BAE1B;IAEK,iBAAiB,iBACR,YAAY,GAAG,sBAAsB,KAClD,YAAY,IAAI,sBAAsB,CAEvC;IAEF,OAAO,CAAC,cAAc,CAGpB;IAEF,OAAO,CAAC,kBAAkB,CAExB;IAEF,OAAO,CAAC,uBAAuB,CAE7B;IAEF,OAAO,CAAC,UAAU,CAqBhB;IAEF,OAAO,CAAC,yBAAyB,CAS/B;IAEK,oBAAoB,QAAa,OAAO,CAAC,OAAO,CAAC,CActD;CACH"}
package/lib/Account.js CHANGED
@@ -124,7 +124,10 @@ class Account extends commons_1.TypedEventEmitter {
124
124
  * @param apiClient The apiClient instance to use in the core (will create a new new one if undefined)
125
125
  * @param accountOptions
126
126
  */
127
- constructor(apiClient = new api_client_1.APIClient(), options = { nbPrekeys: 100, coreCryptoConfig: { wasmFilePath: '', enabled: false } }) {
127
+ constructor(apiClient = new api_client_1.APIClient(), options = {
128
+ nbPrekeys: 100,
129
+ coreCryptoConfig: { wasmFilePath: '', enabled: false },
130
+ }) {
128
131
  super();
129
132
  this.options = options;
130
133
  this.apiClient = apiClient;
@@ -235,17 +238,23 @@ class Account extends commons_1.TypedEventEmitter {
235
238
  /**
236
239
  * Will register a new client for the current user
237
240
  */
238
- registerClient = async (loginData, clientInfo = coreDefaultClient,
241
+ registerClient = async (loginData, clientInfo = coreDefaultClient, useLegacyNotificationStream,
239
242
  /** will add extra manual entropy to the client's identity being created */
240
243
  entropyData) => {
241
244
  if (!this.service || !this.apiClient.context || !this.storeEngine) {
242
245
  throw new Error('Services are not set or context not initialized.');
243
246
  }
247
+ if (typeof useLegacyNotificationStream !== 'boolean') {
248
+ throw new Error('use of legacy notifications must be explicitly set to true or false');
249
+ }
244
250
  // we reset the services to re-instantiate a new CryptoClient instance
245
251
  await this.initServices(this.apiClient.context);
246
252
  const initialPreKeys = await this.service.proteus.createClient(entropyData);
247
- const client = await this.service.client.register(loginData, clientInfo, initialPreKeys);
253
+ const client = await this.service.client.register(loginData, clientInfo, initialPreKeys, useLegacyNotificationStream);
248
254
  const clientId = client.id;
255
+ if (useLegacyNotificationStream) {
256
+ await this.service.notification.legacyInitializeNotificationStream(clientId);
257
+ }
249
258
  await this.service.client.synchronizeClients(clientId);
250
259
  return client;
251
260
  };
@@ -424,23 +433,33 @@ class Account extends commons_1.TypedEventEmitter {
424
433
  * @param callbacks callbacks that will be called to handle different events
425
434
  * @returns close a function that will disconnect from the websocket
426
435
  */
427
- listen = async ({ onEvent = () => { }, onConnectionStateChanged: onConnectionStateChangedCallBack = () => { }, onNotificationStreamProgress = () => { }, onMissedNotifications = () => { }, dryRun = false, } = {}) => {
436
+ listen = async ({ useLegacy, onEvent = () => { }, onConnectionStateChanged: onConnectionStateChangedCallBack = () => { }, onNotificationStreamProgress = () => { }, onMissedNotifications = () => { }, dryRun = false, } = {}) => {
428
437
  if (!this.currentClient) {
429
438
  throw new Error('Client has not been initialized - please login first');
430
439
  }
440
+ if (typeof useLegacy !== 'boolean') {
441
+ throw new Error('use of legacy notifications must be explicitly set to true or false');
442
+ }
431
443
  const onConnectionStateChanged = this.createConnectionStateChangedHandler(onConnectionStateChangedCallBack);
432
444
  const handleEvent = this.createEventHandler(onEvent);
433
445
  const handleLegacyNotification = this.createLegacyNotificationHandler(handleEvent, dryRun);
434
446
  const handleNotification = this.createNotificationHandler(handleEvent, onNotificationStreamProgress, onConnectionStateChanged, dryRun);
435
447
  const handleMissedNotifications = this.createLegacyMissedNotificationsHandler(onMissedNotifications);
436
- const processNotificationStream = this.createLegacyNotificationStreamProcessor({
448
+ const legacyProcessNotificationStream = this.createLegacyNotificationStreamProcessor({
437
449
  handleLegacyNotification,
438
450
  handleMissedNotifications,
439
451
  onNotificationStreamProgress,
440
452
  onConnectionStateChanged,
441
453
  });
442
- this.setupWebSocketListeners(handleNotification, onConnectionStateChanged);
454
+ this.setupWebSocketListeners(onConnectionStateChanged, handleNotification, handleLegacyNotification);
443
455
  const isClientCapableOfConsumableNotifications = this.getClientCapabilities().includes(client_1.ClientCapability.CONSUMABLE_NOTIFICATIONS);
456
+ const capabilities = [client_1.ClientCapability.LEGAL_HOLD_IMPLICIT_CONSENT];
457
+ if (!useLegacy) {
458
+ // let the backend now client is capable of consumable notifications
459
+ capabilities.push(client_1.ClientCapability.CONSUMABLE_NOTIFICATIONS);
460
+ this.apiClient.transport.ws.useAsyncNotificationsSocket();
461
+ }
462
+ await this.service?.client.putClientCapabilities(this.currentClient.id, { capabilities });
444
463
  /*
445
464
  * When enabling async notifications, be aware that the backend maintains a separate queue
446
465
  * for new async notifications (/events weboscket endpoint), which only starts populating *after* the client declares support
@@ -455,15 +474,23 @@ class Account extends commons_1.TypedEventEmitter {
455
474
  *
456
475
  * @todo This can be removed when all clients are capable of consumable notifications.
457
476
  */
458
- if (!isClientCapableOfConsumableNotifications) {
459
- // let the backend now client is capable of consumable notifications
460
- await this.service?.client.putClientCapabilities(this.currentClient.id, {
461
- capabilities: [client_1.ClientCapability.LEGAL_HOLD_IMPLICIT_CONSENT, client_1.ClientCapability.CONSUMABLE_NOTIFICATIONS],
462
- });
477
+ if (!isClientCapableOfConsumableNotifications && !useLegacy) {
463
478
  // do a quick legacy sync without connecting to any websockets
464
- await processNotificationStream();
479
+ await legacyProcessNotificationStream();
465
480
  }
466
- this.apiClient.connect(() => {
481
+ if (useLegacy) {
482
+ /**
483
+ * immediately lock the websocket to prevent any new messages from being received
484
+ * before legacy notifications endpoint is fetched otherwise it'll update the last notification ID
485
+ * and fetching legacy notifications will return an empty list
486
+ */
487
+ this.apiClient.transport.ws.lock();
488
+ }
489
+ this.apiClient.connect(async (abortController) => {
490
+ /**
491
+ * This is to avoid passing proposals too early to core crypto
492
+ * @See WPB-18995
493
+ */
467
494
  (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
468
495
  /**
469
496
  * unpause the notification processing queue
@@ -473,6 +500,9 @@ class Account extends commons_1.TypedEventEmitter {
473
500
  * so we need to acknowledge the notifications to let the backend know we are ready for the next batch
474
501
  */
475
502
  this.notificationProcessingQueue.pause(false);
503
+ if (useLegacy) {
504
+ await legacyProcessNotificationStream(abortController);
505
+ }
476
506
  });
477
507
  return () => {
478
508
  this.pauseAndFlushNotificationQueue();
@@ -516,15 +546,19 @@ class Account extends commons_1.TypedEventEmitter {
516
546
  */
517
547
  createLegacyNotificationHandler = (handleEvent, dryRun) => {
518
548
  return async (notification, source) => {
519
- try {
520
- const messages = this.service.notification.handleNotification(notification, source, dryRun);
521
- for await (const message of messages) {
522
- await handleEvent(message, source);
549
+ void this.notificationProcessingQueue
550
+ .push(async () => {
551
+ try {
552
+ const messages = this.service.notification.handleNotification(notification, source, dryRun);
553
+ for await (const message of messages) {
554
+ await handleEvent(message, source);
555
+ }
523
556
  }
524
- }
525
- catch (error) {
526
- this.logger.error(`Failed to handle legacy notification "${notification.id}": ${error.message}`, error);
527
- }
557
+ catch (error) {
558
+ this.logger.error(`Failed to handle legacy notification "${notification.id}": ${error.message}`, error);
559
+ }
560
+ })
561
+ .catch(this.handleNotificationQueueError);
528
562
  };
529
563
  };
530
564
  createNotificationHandler = (handleEvent, onNotificationStreamProgress, onConnectionStateChanged, dryRun) => {
@@ -535,12 +569,12 @@ class Account extends commons_1.TypedEventEmitter {
535
569
  return;
536
570
  }
537
571
  if (notification.type === ConsumableNotification_1.ConsumableEvent.SYNCHRONIZATION) {
538
- void this.notificationProcessingQueue
572
+ this.notificationProcessingQueue
539
573
  .push(() => this.handleSynchronizationNotification(notification, onConnectionStateChanged))
540
574
  .catch(this.handleNotificationQueueError);
541
575
  return;
542
576
  }
543
- void this.notificationProcessingQueue
577
+ this.notificationProcessingQueue
544
578
  .push(() => this.decryptAckEmitNotification(notification, handleEvent, source, onNotificationStreamProgress, dryRun))
545
579
  .catch(this.handleNotificationQueueError);
546
580
  }
@@ -628,7 +662,8 @@ class Account extends commons_1.TypedEventEmitter {
628
662
  * @param handlers Various logic handlers wired to notification callbacks
629
663
  */
630
664
  createLegacyNotificationStreamProcessor = ({ handleLegacyNotification, handleMissedNotifications, onNotificationStreamProgress, onConnectionStateChanged, }) => {
631
- return async () => {
665
+ return async (abortController) => {
666
+ this.apiClient.transport.ws.lock();
632
667
  (0, messageSender_1.pauseMessageSending)();
633
668
  // We want to avoid triggering rejoins of out-of-sync MLS conversations while we are processing the notification stream
634
669
  (0, conversationRejoinQueue_1.pauseRejoiningMLSConversations)();
@@ -639,14 +674,19 @@ class Account extends commons_1.TypedEventEmitter {
639
674
  if (notificationTime) {
640
675
  onNotificationStreamProgress(notificationTime);
641
676
  }
642
- }, handleMissedNotifications);
677
+ }, handleMissedNotifications, abortController);
643
678
  this.logger.info('Finished processing notifications from the legacy endpoint', results);
644
679
  // We need to wait for the notification stream to be fully handled before releasing the message sending queue.
645
680
  // This is due to the nature of how message are encrypted, any change in mls epoch needs to happen before we start encrypting any kind of messages
646
- this.logger.info(`Resuming message sending. ${(0, messageSender_1.getQueueLength)()} messages to be sent`);
647
- (0, messageSender_1.resumeMessageSending)();
648
- (0, conversationRejoinQueue_1.resumeRejoiningMLSConversations)();
649
- onConnectionStateChanged(ConnectionState.LIVE);
681
+ void this.notificationProcessingQueue
682
+ .push(async () => {
683
+ this.logger.info(`Resuming message sending. ${(0, messageSender_1.getQueueLength)()} messages to be sent`);
684
+ (0, messageSender_1.resumeMessageSending)();
685
+ (0, conversationRejoinQueue_1.resumeRejoiningMLSConversations)();
686
+ onConnectionStateChanged(ConnectionState.LIVE);
687
+ this.apiClient.transport.ws.unlock();
688
+ })
689
+ .catch(this.handleNotificationQueueError);
650
690
  };
651
691
  };
652
692
  /**
@@ -667,9 +707,15 @@ class Account extends commons_1.TypedEventEmitter {
667
707
  * On each new backend message, we pass it to the notification handler.
668
708
  * On state changes, we map raw socket states to public connection states and emit them.
669
709
  */
670
- setupWebSocketListeners = (handleNotification, onConnectionStateChanged) => {
710
+ setupWebSocketListeners = (onConnectionStateChanged, handleNotification, handleLegacyNotification) => {
671
711
  this.apiClient.transport.ws.removeAllListeners(tcp_1.WebSocketClient.TOPIC.ON_MESSAGE);
672
- this.apiClient.transport.ws.on(tcp_1.WebSocketClient.TOPIC.ON_MESSAGE, notification => handleNotification(notification, notification_1.NotificationSource.WEBSOCKET));
712
+ this.apiClient.transport.ws.on(tcp_1.WebSocketClient.TOPIC.ON_MESSAGE, notification => {
713
+ if (this.checkIsConsumable(notification)) {
714
+ void handleNotification(notification, notification_1.NotificationSource.WEBSOCKET);
715
+ return;
716
+ }
717
+ void handleLegacyNotification(notification, notification_1.NotificationSource.WEBSOCKET);
718
+ });
673
719
  this.apiClient.transport.ws.on(tcp_1.WebSocketClient.TOPIC.ON_STATE_CHANGE, wsState => {
674
720
  const mapping = {
675
721
  [ReconnectingWebsocket_1.WEBSOCKET_STATE.CLOSED]: ConnectionState.CLOSED,
@@ -157,6 +157,11 @@ describe('Account', () => {
157
157
  capabilities: ['legalhold-implicit-consent', 'consumable-notifications'],
158
158
  })
159
159
  .reply(http_status_codes_1.StatusCodes.OK);
160
+ (0, nock_1.default)(MOCK_BACKEND.rest)
161
+ .put(/\/clients\/[\w-]+$/, {
162
+ capabilities: ['legalhold-implicit-consent'],
163
+ })
164
+ .reply(http_status_codes_1.StatusCodes.OK);
160
165
  (0, nock_1.default)(MOCK_BACKEND.rest)
161
166
  .get(self_1.SelfAPI.URL.SELF)
162
167
  .reply(http_status_codes_1.StatusCodes.OK, {
@@ -298,6 +303,7 @@ describe('Account', () => {
298
303
  const onEvent = jest.fn().mockImplementation(() => { });
299
304
  mockNotifications(nbNotifications);
300
305
  await dependencies.account.listen({
306
+ useLegacy: false,
301
307
  onConnectionStateChanged: callWhen(Account_1.ConnectionState.LIVE, async () => {
302
308
  expect(onNotificationStreamProgress).toHaveBeenCalledTimes(nbNotifications);
303
309
  expect(onEvent).toHaveBeenCalledTimes(nbNotifications);
@@ -310,7 +316,10 @@ describe('Account', () => {
310
316
  .mockReturnValue([{ event: { testData: 1 } }]);
311
317
  server.send(JSON.stringify({
312
318
  type: ConsumableNotification_1.ConsumableEvent.EVENT,
313
- data: { delivery_tag: 1000, event: { id: (0, uuid_1.v4)(), payload: [] } },
319
+ data: {
320
+ delivery_tag: 1000,
321
+ event: { id: (0, uuid_1.v4)(), payload: [] },
322
+ },
314
323
  }));
315
324
  await waitFor(() => expect(onEvent).toHaveBeenCalledTimes(1));
316
325
  expect(onEvent).not.toHaveBeenCalledWith(expect.any(Object), notification_2.NotificationSource.NOTIFICATION_STREAM);
@@ -322,7 +331,31 @@ describe('Account', () => {
322
331
  });
323
332
  });
324
333
  });
325
- it('warns consumer of the connection state', async () => {
334
+ it('sends information to consumer of the connection state change in order', async () => {
335
+ await new Promise(async (resolve) => {
336
+ mockNotifications(10);
337
+ const onConnectionStateChanged = jest.fn().mockImplementation((state) => {
338
+ switch (state) {
339
+ case Account_1.ConnectionState.LIVE:
340
+ break;
341
+ case Account_1.ConnectionState.CLOSED:
342
+ // Expect all states to have been called in order
343
+ expect(onConnectionStateChanged).toHaveBeenNthCalledWith(1, Account_1.ConnectionState.PROCESSING_NOTIFICATIONS);
344
+ expect(onConnectionStateChanged).toHaveBeenNthCalledWith(2, Account_1.ConnectionState.CONNECTING);
345
+ expect(onConnectionStateChanged).toHaveBeenNthCalledWith(3, Account_1.ConnectionState.LIVE);
346
+ resolve();
347
+ break;
348
+ }
349
+ });
350
+ const disconnect = await dependencies.account.listen({
351
+ useLegacy: false,
352
+ onConnectionStateChanged,
353
+ });
354
+ await waitFor(() => expect(onConnectionStateChanged).toHaveBeenCalledWith(Account_1.ConnectionState.LIVE));
355
+ disconnect();
356
+ });
357
+ });
358
+ it('warns consumer of the connection close', async () => {
326
359
  await new Promise(async (resolve) => {
327
360
  mockNotifications(10);
328
361
  const onConnectionStateChanged = jest.fn().mockImplementation((state) => {
@@ -332,12 +365,14 @@ describe('Account', () => {
332
365
  case Account_1.ConnectionState.CLOSED:
333
366
  // Expect all states to have been called in order
334
367
  expect(onConnectionStateChanged).toHaveBeenNthCalledWith(1, Account_1.ConnectionState.PROCESSING_NOTIFICATIONS);
335
- expect(onConnectionStateChanged).toHaveBeenNthCalledWith(2, Account_1.ConnectionState.LIVE);
368
+ expect(onConnectionStateChanged).toHaveBeenNthCalledWith(2, Account_1.ConnectionState.CONNECTING);
369
+ expect(onConnectionStateChanged).toHaveBeenNthCalledWith(3, Account_1.ConnectionState.CLOSED);
336
370
  resolve();
337
371
  break;
338
372
  }
339
373
  });
340
374
  const disconnect = await dependencies.account.listen({
375
+ useLegacy: false,
341
376
  onConnectionStateChanged,
342
377
  });
343
378
  await waitFor(() => expect(onConnectionStateChanged).toHaveBeenCalledWith(Account_1.ConnectionState.PROCESSING_NOTIFICATIONS));
@@ -351,6 +386,7 @@ describe('Account', () => {
351
386
  const onEvent = jest.fn();
352
387
  mockNotifications(nbNotifications);
353
388
  await dependencies.account.listen({
389
+ useLegacy: false,
354
390
  onConnectionStateChanged: callWhen(Account_1.ConnectionState.LIVE, () => {
355
391
  expect(onNotificationStreamProgress).toHaveBeenCalledTimes(nbNotifications);
356
392
  expect(onEvent).toHaveBeenCalledTimes(nbNotifications);
@@ -362,28 +398,40 @@ describe('Account', () => {
362
398
  });
363
399
  });
364
400
  });
365
- it('does not stop proccessing messages if websocket connection is aborted', async () => {
401
+ it('does stop processing messages if websocket connection is aborted', async () => {
366
402
  jest
367
403
  .spyOn(dependencies.account, 'getClientCapabilities')
368
- .mockReturnValue([client_1.ClientCapability.LEGAL_HOLD_IMPLICIT_CONSENT]);
404
+ .mockReturnValue([client_1.ClientCapability.LEGAL_HOLD_IMPLICIT_CONSENT, client_1.ClientCapability.CONSUMABLE_NOTIFICATIONS]);
369
405
  const nbNotifications = 10;
370
- const onNotificationStreamProgress = jest
406
+ const onNotificationStreamProgress = jest.fn();
407
+ const onEvent = jest
371
408
  .fn()
372
409
  .mockImplementationOnce(() => { })
373
410
  .mockImplementationOnce(() => {
374
411
  // abort websocket connection after the second notification is processeed
375
- server.close();
412
+ server.close({ reason: 'Aborted by test', code: 2000, wasClean: true });
376
413
  });
377
- const onEvent = jest.fn();
378
- mockNotifications(nbNotifications);
379
414
  return new Promise(async (resolve) => {
380
415
  return dependencies.account.listen({
416
+ useLegacy: false,
381
417
  onConnectionStateChanged: async (state) => {
382
418
  switch (state) {
383
- case Account_1.ConnectionState.LIVE:
384
- expect(onNotificationStreamProgress).toHaveBeenCalledTimes(10);
385
- expect(onEvent).toHaveBeenCalledTimes(10);
386
- expect(onEvent).toHaveBeenCalledWith(expect.any(Object), notification_2.NotificationSource.NOTIFICATION_STREAM);
419
+ case Account_1.ConnectionState.CONNECTING:
420
+ await server.connected;
421
+ for (let i = 0; i < nbNotifications; i++) {
422
+ server.send(JSON.stringify({
423
+ type: ConsumableNotification_1.ConsumableEvent.EVENT,
424
+ data: {
425
+ delivery_tag: 1000,
426
+ event: { id: (0, uuid_1.v4)(), payload: [{ domain: 'zinfra.io', type: 'federation.delete' }] },
427
+ },
428
+ }));
429
+ }
430
+ break;
431
+ case Account_1.ConnectionState.CLOSED:
432
+ expect(onNotificationStreamProgress).toHaveBeenCalledTimes(2);
433
+ expect(onEvent).toHaveBeenCalledTimes(2);
434
+ expect(onEvent).toHaveBeenCalledWith({ domain: 'zinfra.io', type: 'federation.delete' }, notification_2.NotificationSource.WEBSOCKET);
387
435
  expect(dependencies.account.service.notification.handleNotification).not.toHaveBeenCalledWith(expect.any(Object), notification_2.NotificationSource.WEBSOCKET);
388
436
  resolve();
389
437
  }
@@ -53,6 +53,6 @@ export declare class ClientService {
53
53
  * @param currentClient - the id of the current client (to be excluded from the list)
54
54
  */
55
55
  synchronizeClients(currentClient: string): Promise<MetaClient[]>;
56
- register(loginData: LoginData, clientInfo: ClientInfo, { prekeys, lastPrekey }: InitialPrekeys): Promise<RegisteredClient>;
56
+ register(loginData: LoginData, clientInfo: ClientInfo, { prekeys, lastPrekey }: InitialPrekeys, useLegacyNotificationStream?: boolean): Promise<RegisteredClient>;
57
57
  }
58
58
  //# sourceMappingURL=ClientService.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ClientService.d.ts","sourceRoot":"","sources":["../../src/client/ClientService.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAEL,oBAAoB,EAGpB,gBAAgB,EACjB,MAAM,iCAAiC,CAAC;AAKzC,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAC;AAEjD,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAC,cAAc,EAAC,MAAM,2DAA2D,CAAC;AAEzF,OAAO,EAAC,UAAU,EAAoD,MAAM,IAAI,CAAC;AAEjF,MAAM,WAAW,UAAW,SAAQ,gBAAgB;IAClD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE;QACJ,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;CACH;AAED,qBAAa,aAAa;IAMtB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,cAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,WAAW;IAP9B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA2B;IACpD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA0B;IAClD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgD;gBAGpD,SAAS,EAAE,SAAS,EAC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BAA2B,GAAE,OAAc,GAC1C,OAAO,CAAC,gBAAgB,CAAC;CAkC7B"}
@@ -131,16 +131,20 @@ class ClientService {
131
131
  return this.database.createClientList({ id: this.apiClient.context.userId, domain: this.apiClient.context.domain ?? '' }, filteredClients);
132
132
  }
133
133
  // TODO: Split functionality into "create" and "register" client
134
- async register(loginData, clientInfo, { prekeys, lastPrekey }) {
134
+ async register(loginData, clientInfo, { prekeys, lastPrekey }, useLegacyNotificationStream = true) {
135
135
  if (!this.apiClient.context) {
136
136
  throw new Error('Context is not set.');
137
137
  }
138
138
  if (loginData.clientType === client_1.ClientType.NONE) {
139
139
  throw new Error(`Can't register client of type "${client_1.ClientType.NONE}"`);
140
140
  }
141
+ const capabilities = [client_1.ClientCapability.LEGAL_HOLD_IMPLICIT_CONSENT];
142
+ if (!useLegacyNotificationStream) {
143
+ capabilities.push(client_1.ClientCapability.CONSUMABLE_NOTIFICATIONS);
144
+ }
141
145
  const newClient = {
142
146
  class: clientInfo.classification,
143
- capabilities: [client_1.ClientCapability.LEGAL_HOLD_IMPLICIT_CONSENT, client_1.ClientCapability.CONSUMABLE_NOTIFICATIONS],
147
+ capabilities,
144
148
  cookie: clientInfo.cookieLabel,
145
149
  label: clientInfo.label,
146
150
  lastkey: lastPrekey,
@@ -3,7 +3,7 @@ import { APIClient } from '@wireapp/api-client';
3
3
  export declare class NotificationBackendRepository {
4
4
  private readonly apiClient;
5
5
  constructor(apiClient: APIClient);
6
- getAllNotifications(clientId?: string, lastNotificationId?: string): Promise<{
6
+ getAllNotifications(clientId?: string, lastNotificationId?: string, abortController?: AbortController): Promise<{
7
7
  notifications: Notification[];
8
8
  missedNotification?: string;
9
9
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationBackendRepository.d.ts","sourceRoot":"","sources":["../../src/notification/NotificationBackendRepository.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,YAAY,EAAC,MAAM,uCAAuC,CAAC;AAEnE,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAE9C,qBAAa,6BAA6B;IAC5B,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAAT,SAAS,EAAE,SAAS;IAEpC,mBAAmB,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,kBAAkB,CAAC,EAAE,MAAM;;;;IAIxE,mBAAmB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;CAGrE"}
1
+ {"version":3,"file":"NotificationBackendRepository.d.ts","sourceRoot":"","sources":["../../src/notification/NotificationBackendRepository.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,YAAY,EAAC,MAAM,uCAAuC,CAAC;AAEnE,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAE9C,qBAAa,6BAA6B;IAC5B,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAAT,SAAS,EAAE,SAAS;IAEpC,mBAAmB,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,kBAAkB,CAAC,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,eAAe;;;;IAI3G,mBAAmB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;CAGrE"}
@@ -24,8 +24,8 @@ class NotificationBackendRepository {
24
24
  constructor(apiClient) {
25
25
  this.apiClient = apiClient;
26
26
  }
27
- async getAllNotifications(clientId, lastNotificationId) {
28
- return this.apiClient.api.notification.getAllNotifications(clientId, lastNotificationId);
27
+ async getAllNotifications(clientId, lastNotificationId, abortController) {
28
+ return this.apiClient.api.notification.getAllNotifications(clientId, lastNotificationId, abortController);
29
29
  }
30
30
  getLastNotification(clientId) {
31
31
  return this.apiClient.api.notification.getLastNotification(clientId);
@@ -70,7 +70,7 @@ export declare class NotificationService extends TypedEventEmitter<Events> {
70
70
  *
71
71
  * @deprecated When all client are migrated to the consumable/async notification stream, this method must be removed.
72
72
  */
73
- legacyProcessNotificationStream(notificationHandler: NotificationHandler, onMissedNotifications: (notificationId: string) => void): Promise<{
73
+ legacyProcessNotificationStream(notificationHandler: NotificationHandler, onMissedNotifications: (notificationId: string) => void, abortHandler?: AbortController): Promise<{
74
74
  total: number;
75
75
  error: number;
76
76
  success: number;
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationService.d.ts","sourceRoot":"","sources":["../../src/notification/NotificationService.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,YAAY,EAAC,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAC,YAAY,EAAC,MAAM,uCAAuC,CAAC;AAEnE,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAa,iBAAiB,EAAC,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAC,cAAc,EAAC,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAC,UAAU,EAA4B,MAAM,uBAAuB,CAAC;AAI5E,OAAO,EAAC,kBAAkB,EAAC,MAAM,uBAAuB,CAAC;AAEzD,OAAO,EAAC,mBAAmB,EAAC,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAY,iBAAiB,EAAC,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAC,eAAe,EAAC,MAAM,2BAA2B,CAAC;AAE1D,MAAM,MAAM,mBAAmB,GAAG;IAChC,0CAA0C;IAC1C,KAAK,EAAE,YAAY,CAAC;IACpB,kEAAkE;IAClE,aAAa,CAAC,EAAE,cAAc,CAAC;IAC/B,8FAA8F;IAC9F,eAAe,CAAC,EAAE,eAAe,CAAC;CACnC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAC1B;IAAC,MAAM,EAAE,WAAW,CAAA;CAAC,GACrB;IAAC,MAAM,EAAE,SAAS,CAAA;CAAC,GACnB;IAAC,MAAM,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAAA;CAAC,CAAC;AAE7D,aAAK,KAAK;IACR,kBAAkB,iDAAiD;CACpE;AAED,MAAM,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CAAA;KAAC,CAAC;IAoC3D;;;;;;;OAOG;IACH,OAAO,CAAC,eAAe;IAYT,kBAAkB,CAC9B,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,kBAAkB,EAC1B,MAAM,GAAE,OAAe,GACtB,cAAc,CAAC,mBAAmB,CAAC;IAmCtC;;;;;OAKG;YACW,WAAW;CAc1B"}
@@ -43,9 +43,9 @@ class NotificationService extends commons_1.TypedEventEmitter {
43
43
  this.backend = new NotificationBackendRepository_1.NotificationBackendRepository(this.apiClient);
44
44
  this.database = new NotificationDatabaseRepository_1.NotificationDatabaseRepository(storeEngine);
45
45
  }
46
- async getAllNotifications(since) {
46
+ async getAllNotifications(since, abortController) {
47
47
  const clientId = this.apiClient.clientId;
48
- return this.backend.getAllNotifications(clientId, since);
48
+ return this.backend.getAllNotifications(clientId, since, abortController);
49
49
  }
50
50
  /**
51
51
  * Should only be called with a completely new client.
@@ -95,9 +95,9 @@ class NotificationService extends commons_1.TypedEventEmitter {
95
95
  *
96
96
  * @deprecated When all client are migrated to the consumable/async notification stream, this method must be removed.
97
97
  */
98
- async legacyProcessNotificationStream(notificationHandler, onMissedNotifications) {
98
+ async legacyProcessNotificationStream(notificationHandler, onMissedNotifications, abortHandler) {
99
99
  const lastNotificationId = await this.database.getLastNotificationId();
100
- const { notifications, missedNotification } = await this.getAllNotifications(lastNotificationId);
100
+ const { notifications, missedNotification } = await this.getAllNotifications(lastNotificationId, abortHandler);
101
101
  if (missedNotification) {
102
102
  onMissedNotifications(missedNotification);
103
103
  }
@@ -107,6 +107,13 @@ class NotificationService extends commons_1.TypedEventEmitter {
107
107
  : `No notification to process from the stream`;
108
108
  this.logger.log(logMessage);
109
109
  for (const [index, notification] of notifications.entries()) {
110
+ if (abortHandler?.signal.aborted) {
111
+ /* Stop handling notifications if the websocket has been disconnected.
112
+ * Upon reconnecting we are going to restart handling the notification stream for where we left of
113
+ */
114
+ this.logger.warn(`Stop processing notifications as connection to websocket was closed`);
115
+ return results;
116
+ }
110
117
  try {
111
118
  await notificationHandler(notification, Notifications_types_1.NotificationSource.NOTIFICATION_STREAM, {
112
119
  done: index + 1,
package/package.json CHANGED
@@ -11,20 +11,20 @@
11
11
  "./lib/cryptography/AssetCryptography/crypto.node": "./lib/cryptography/AssetCryptography/crypto.browser.js"
12
12
  },
13
13
  "dependencies": {
14
- "@wireapp/api-client": "^27.70.0",
14
+ "@wireapp/api-client": "^27.72.0",
15
15
  "@wireapp/commons": "^5.4.3",
16
16
  "@wireapp/core-crypto": "7.0.1",
17
17
  "@wireapp/cryptobox": "12.8.0",
18
18
  "@wireapp/priority-queue": "^2.1.11",
19
19
  "@wireapp/promise-queue": "^2.4.1",
20
- "@wireapp/protocol-messaging": "1.52.0",
20
+ "@wireapp/protocol-messaging": "1.53.0",
21
21
  "@wireapp/store-engine": "^5.1.11",
22
- "axios": "1.7.9",
22
+ "axios": "1.11.0",
23
23
  "bazinga64": "^6.5.0",
24
24
  "deepmerge-ts": "6.0.0",
25
25
  "hash.js": "1.1.7",
26
26
  "http-status-codes": "2.3.0",
27
- "idb": "8.0.2",
27
+ "idb": "8.0.3",
28
28
  "logdown": "3.3.1",
29
29
  "long": "^5.2.0",
30
30
  "uuid": "9.0.1",
@@ -61,6 +61,6 @@
61
61
  "test:coverage": "jest --coverage",
62
62
  "watch": "tsc --watch"
63
63
  },
64
- "version": "46.31.8",
65
- "gitHead": "85f8c029eaf07823c32a719907a3519979338f2e"
64
+ "version": "46.32.1",
65
+ "gitHead": "7c26ce9566880ee2e0107456f546a2dd24179085"
66
66
  }