stream-chat-angular 2.6.2 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- export declare const version = "2.6.2";
1
+ export declare const version = "2.7.0";
@@ -353,7 +353,7 @@
353
353
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
354
354
  }
355
355
 
356
- var version = '2.6.2';
356
+ var version = '2.7.0';
357
357
 
358
358
  var NotificationService = /** @class */ (function () {
359
359
  function NotificationService() {
@@ -413,7 +413,7 @@
413
413
  this.connectionState$ = this.connectionStateSubject.asObservable();
414
414
  this.appSettings$ = this.appSettingsSubject.asObservable();
415
415
  }
416
- ChatClientService.prototype.init = function (apiKey, userId, userToken) {
416
+ ChatClientService.prototype.init = function (apiKey, userOrId, userTokenOrProvider) {
417
417
  return __awaiter(this, void 0, void 0, function () {
418
418
  var removeNotification;
419
419
  var _this = this;
@@ -422,9 +422,12 @@
422
422
  case 0:
423
423
  this.chatClient = streamChat.StreamChat.getInstance(apiKey);
424
424
  return [4 /*yield*/, this.ngZone.runOutsideAngular(function () { return __awaiter(_this, void 0, void 0, function () {
425
+ var user;
425
426
  return __generator(this, function (_a) {
426
427
  switch (_a.label) {
427
- case 0: return [4 /*yield*/, this.chatClient.connectUser({ id: userId }, userToken)];
428
+ case 0:
429
+ user = typeof userOrId === 'string' ? { id: userOrId } : userOrId;
430
+ return [4 /*yield*/, this.chatClient.connectUser(user, userTokenOrProvider)];
428
431
  case 1:
429
432
  _a.sent();
430
433
  this.chatClient.setUserAgent("stream-chat-angular-" + version + "-" + this.chatClient.getUserAgent());