stream-chat-angular 3.5.3 → 3.6.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.
- package/assets/version.d.ts +1 -1
- package/bundles/stream-chat-angular.umd.js +5 -1
- package/bundles/stream-chat-angular.umd.js.map +1 -1
- package/esm2015/assets/version.js +2 -2
- package/esm2015/lib/chat-client.service.js +5 -1
- package/fesm2015/stream-chat-angular.js +5 -1
- package/fesm2015/stream-chat-angular.js.map +1 -1
- package/lib/chat-client.service.d.ts +5 -0
- package/package.json +1 -1
- package/src/assets/version.ts +1 -1
package/assets/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "3.
|
|
1
|
+
export declare const version = "3.6.0";
|
|
@@ -354,7 +354,7 @@
|
|
|
354
354
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
355
355
|
}
|
|
356
356
|
|
|
357
|
-
var version = '3.
|
|
357
|
+
var version = '3.6.0';
|
|
358
358
|
|
|
359
359
|
/**
|
|
360
360
|
* The `NotificationService` can be used to add or remove notifications. By default the [`NotificationList`](../components/NotificationListComponent.mdx) component displays the currently active notifications.
|
|
@@ -449,11 +449,13 @@
|
|
|
449
449
|
this.connectionStateSubject = new rxjs.ReplaySubject(1);
|
|
450
450
|
this.appSettingsSubject = new rxjs.BehaviorSubject(undefined);
|
|
451
451
|
this.pendingInvitesSubject = new rxjs.BehaviorSubject([]);
|
|
452
|
+
this.userSubject = new rxjs.ReplaySubject(1);
|
|
452
453
|
this.subscriptions = [];
|
|
453
454
|
this.events$ = this.notificationSubject.asObservable();
|
|
454
455
|
this.connectionState$ = this.connectionStateSubject.asObservable();
|
|
455
456
|
this.appSettings$ = this.appSettingsSubject.asObservable();
|
|
456
457
|
this.pendingInvites$ = this.pendingInvitesSubject.asObservable();
|
|
458
|
+
this.user$ = this.userSubject.asObservable();
|
|
457
459
|
}
|
|
458
460
|
/**
|
|
459
461
|
* Creates a [`StreamChat`](https://github.com/GetStream/stream-chat-js/blob/668b3e5521339f4e14fc657834531b4c8bf8176b/src/client.ts#L124) instance using the provided `apiKey`, and connects a user with the given meta data and token. More info about [connecting users](https://getstream.io/chat/docs/javascript/init_and_users/?language=javascript) can be found in the platform documentation.
|
|
@@ -480,6 +482,7 @@
|
|
|
480
482
|
return [4 /*yield*/, this.chatClient.connectUser(user, userTokenOrProvider)];
|
|
481
483
|
case 1:
|
|
482
484
|
result = _d.sent();
|
|
485
|
+
this.userSubject.next(this.chatClient.user);
|
|
483
486
|
this.chatClient.setUserAgent("stream-chat-angular-" + version + "-" + this.chatClient.getUserAgent());
|
|
484
487
|
return [2 /*return*/];
|
|
485
488
|
}
|
|
@@ -532,6 +535,7 @@
|
|
|
532
535
|
return [4 /*yield*/, this.chatClient.disconnectUser()];
|
|
533
536
|
case 1:
|
|
534
537
|
_d.sent();
|
|
538
|
+
this.userSubject.next(undefined);
|
|
535
539
|
this.subscriptions.forEach(function (s) { return s.unsubscribe(); });
|
|
536
540
|
return [2 /*return*/];
|
|
537
541
|
}
|