stream-chat-angular 3.0.0-beta.4 → 3.0.0-beta.5
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 +19 -19
- package/bundles/stream-chat-angular.umd.js.map +1 -1
- package/esm2015/assets/version.js +2 -2
- package/esm2015/lib/channel.service.js +18 -18
- package/esm2015/lib/chat-client.service.js +2 -2
- package/fesm2015/stream-chat-angular.js +19 -19
- package/fesm2015/stream-chat-angular.js.map +1 -1
- package/lib/channel.service.d.ts +4 -4
- package/lib/chat-client.service.d.ts +3 -3
- 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.0.0-beta.
|
|
1
|
+
export declare const version = "3.0.0-beta.5";
|
|
@@ -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.0.0-beta.
|
|
357
|
+
var version = '3.0.0-beta.5';
|
|
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,7 +449,7 @@
|
|
|
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.
|
|
452
|
+
this.events$ = this.notificationSubject.asObservable();
|
|
453
453
|
this.connectionState$ = this.connectionStateSubject.asObservable();
|
|
454
454
|
this.appSettings$ = this.appSettingsSubject.asObservable();
|
|
455
455
|
this.pendingInvites$ = this.pendingInvitesSubject.asObservable();
|
|
@@ -875,7 +875,7 @@
|
|
|
875
875
|
return [4 /*yield*/, this.queryChannels()];
|
|
876
876
|
case 1:
|
|
877
877
|
_h.sent();
|
|
878
|
-
this.chatClientService.
|
|
878
|
+
this.chatClientService.events$.subscribe(function (notification) { return void _this.handleNotification(notification); });
|
|
879
879
|
return [2 /*return*/];
|
|
880
880
|
}
|
|
881
881
|
});
|
|
@@ -1218,16 +1218,16 @@
|
|
|
1218
1218
|
});
|
|
1219
1219
|
});
|
|
1220
1220
|
};
|
|
1221
|
-
ChannelService.prototype.handleNotification = function (
|
|
1221
|
+
ChannelService.prototype.handleNotification = function (clientEvent) {
|
|
1222
1222
|
var _this = this;
|
|
1223
|
-
switch (
|
|
1223
|
+
switch (clientEvent.eventType) {
|
|
1224
1224
|
case 'notification.message_new': {
|
|
1225
1225
|
this.ngZone.run(function () {
|
|
1226
1226
|
if (_this.customNewMessageNotificationHandler) {
|
|
1227
|
-
_this.customNewMessageNotificationHandler(
|
|
1227
|
+
_this.customNewMessageNotificationHandler(clientEvent, _this.channelListSetter);
|
|
1228
1228
|
}
|
|
1229
1229
|
else {
|
|
1230
|
-
_this.handleNewMessageNotification(
|
|
1230
|
+
_this.handleNewMessageNotification(clientEvent);
|
|
1231
1231
|
}
|
|
1232
1232
|
});
|
|
1233
1233
|
break;
|
|
@@ -1235,10 +1235,10 @@
|
|
|
1235
1235
|
case 'notification.added_to_channel': {
|
|
1236
1236
|
this.ngZone.run(function () {
|
|
1237
1237
|
if (_this.customAddedToChannelNotificationHandler) {
|
|
1238
|
-
_this.customAddedToChannelNotificationHandler(
|
|
1238
|
+
_this.customAddedToChannelNotificationHandler(clientEvent, _this.channelListSetter);
|
|
1239
1239
|
}
|
|
1240
1240
|
else {
|
|
1241
|
-
_this.handleAddedToChannelNotification(
|
|
1241
|
+
_this.handleAddedToChannelNotification(clientEvent);
|
|
1242
1242
|
}
|
|
1243
1243
|
});
|
|
1244
1244
|
break;
|
|
@@ -1246,27 +1246,27 @@
|
|
|
1246
1246
|
case 'notification.removed_from_channel': {
|
|
1247
1247
|
this.ngZone.run(function () {
|
|
1248
1248
|
if (_this.customRemovedFromChannelNotificationHandler) {
|
|
1249
|
-
_this.customRemovedFromChannelNotificationHandler(
|
|
1249
|
+
_this.customRemovedFromChannelNotificationHandler(clientEvent, _this.channelListSetter);
|
|
1250
1250
|
}
|
|
1251
1251
|
else {
|
|
1252
|
-
_this.handleRemovedFromChannelNotification(
|
|
1252
|
+
_this.handleRemovedFromChannelNotification(clientEvent);
|
|
1253
1253
|
}
|
|
1254
1254
|
});
|
|
1255
1255
|
}
|
|
1256
1256
|
}
|
|
1257
1257
|
};
|
|
1258
|
-
ChannelService.prototype.handleRemovedFromChannelNotification = function (
|
|
1259
|
-
var channelIdToBeRemoved =
|
|
1258
|
+
ChannelService.prototype.handleRemovedFromChannelNotification = function (clientEvent) {
|
|
1259
|
+
var channelIdToBeRemoved = clientEvent.event.channel.cid;
|
|
1260
1260
|
this.removeChannelsFromChannelList([channelIdToBeRemoved]);
|
|
1261
1261
|
};
|
|
1262
|
-
ChannelService.prototype.handleNewMessageNotification = function (
|
|
1263
|
-
if (
|
|
1264
|
-
this.addChannelsFromNotification([
|
|
1262
|
+
ChannelService.prototype.handleNewMessageNotification = function (clientEvent) {
|
|
1263
|
+
if (clientEvent.event.channel) {
|
|
1264
|
+
this.addChannelsFromNotification([clientEvent.event.channel]);
|
|
1265
1265
|
}
|
|
1266
1266
|
};
|
|
1267
|
-
ChannelService.prototype.handleAddedToChannelNotification = function (
|
|
1268
|
-
if (
|
|
1269
|
-
this.addChannelsFromNotification([
|
|
1267
|
+
ChannelService.prototype.handleAddedToChannelNotification = function (clientEvent) {
|
|
1268
|
+
if (clientEvent.event.channel) {
|
|
1269
|
+
this.addChannelsFromNotification([clientEvent.event.channel]);
|
|
1270
1270
|
}
|
|
1271
1271
|
};
|
|
1272
1272
|
ChannelService.prototype.addChannelsFromNotification = function (channelResponses) {
|