stream-chat-angular 3.3.1 → 3.4.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 +14 -3
- package/bundles/stream-chat-angular.umd.js.map +1 -1
- package/esm2015/assets/version.js +2 -2
- package/esm2015/lib/channel.service.js +14 -3
- package/fesm2015/stream-chat-angular.js +14 -3
- package/fesm2015/stream-chat-angular.js.map +1 -1
- package/lib/channel.service.d.ts +2 -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.4.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.4.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.
|
|
@@ -776,6 +776,7 @@
|
|
|
776
776
|
if (!activeChannel) {
|
|
777
777
|
return;
|
|
778
778
|
}
|
|
779
|
+
this.stopWatchForActiveChannelEvents(activeChannel);
|
|
779
780
|
this.activeChannelMessagesSubject.next([]);
|
|
780
781
|
this.activeChannelSubject.next(undefined);
|
|
781
782
|
this.activeParentMessageIdSubject.next(undefined);
|
|
@@ -899,10 +900,11 @@
|
|
|
899
900
|
message_limit: this.messagePageSize,
|
|
900
901
|
};
|
|
901
902
|
this.sort = sort || { last_message_at: -1, updated_at: -1 };
|
|
902
|
-
|
|
903
|
+
this.shouldSetActiveChannel = shouldSetActiveChannel;
|
|
904
|
+
return [4 /*yield*/, this.queryChannels(this.shouldSetActiveChannel)];
|
|
903
905
|
case 1:
|
|
904
906
|
result = _h.sent();
|
|
905
|
-
this.chatClientService.events$.subscribe(function (notification) { return void _this.handleNotification(notification); });
|
|
907
|
+
this.clientEventsSubscription = this.chatClientService.events$.subscribe(function (notification) { return void _this.handleNotification(notification); });
|
|
906
908
|
return [2 /*return*/, result];
|
|
907
909
|
}
|
|
908
910
|
});
|
|
@@ -912,8 +914,10 @@
|
|
|
912
914
|
* Resets the `activeChannel$`, `channels$` and `activeChannelMessages$` Observables. Useful when disconnecting a chat user, use in combination with [`disconnectUser`](./ChatClientService.mdx/#disconnectuser).
|
|
913
915
|
*/
|
|
914
916
|
ChannelService.prototype.reset = function () {
|
|
917
|
+
var _a;
|
|
915
918
|
this.deselectActiveChannel();
|
|
916
919
|
this.channelsSubject.next(undefined);
|
|
920
|
+
(_a = this.clientEventsSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
917
921
|
};
|
|
918
922
|
/**
|
|
919
923
|
* Loads the next page of channels. The page size can be set in the [query option](https://getstream.io/chat/docs/javascript/query_channels/?language=javascript#query-options) object.
|
|
@@ -1246,6 +1250,13 @@
|
|
|
1246
1250
|
ChannelService.prototype.handleNotification = function (clientEvent) {
|
|
1247
1251
|
var _this = this;
|
|
1248
1252
|
switch (clientEvent.eventType) {
|
|
1253
|
+
case 'connection.recovered': {
|
|
1254
|
+
this.ngZone.run(function () {
|
|
1255
|
+
_this.reset();
|
|
1256
|
+
void _this.init(_this.filters, _this.sort, _this.options, _this.shouldSetActiveChannel);
|
|
1257
|
+
});
|
|
1258
|
+
break;
|
|
1259
|
+
}
|
|
1249
1260
|
case 'notification.message_new': {
|
|
1250
1261
|
this.ngZone.run(function () {
|
|
1251
1262
|
if (_this.customNewMessageNotificationHandler) {
|