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.
@@ -1 +1 @@
1
- export declare const version = "3.0.0-beta.4";
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.4';
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.notification$ = this.notificationSubject.asObservable();
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.notification$.subscribe(function (notification) { return void _this.handleNotification(notification); });
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 (notification) {
1221
+ ChannelService.prototype.handleNotification = function (clientEvent) {
1222
1222
  var _this = this;
1223
- switch (notification.eventType) {
1223
+ switch (clientEvent.eventType) {
1224
1224
  case 'notification.message_new': {
1225
1225
  this.ngZone.run(function () {
1226
1226
  if (_this.customNewMessageNotificationHandler) {
1227
- _this.customNewMessageNotificationHandler(notification, _this.channelListSetter);
1227
+ _this.customNewMessageNotificationHandler(clientEvent, _this.channelListSetter);
1228
1228
  }
1229
1229
  else {
1230
- _this.handleNewMessageNotification(notification);
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(notification, _this.channelListSetter);
1238
+ _this.customAddedToChannelNotificationHandler(clientEvent, _this.channelListSetter);
1239
1239
  }
1240
1240
  else {
1241
- _this.handleAddedToChannelNotification(notification);
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(notification, _this.channelListSetter);
1249
+ _this.customRemovedFromChannelNotificationHandler(clientEvent, _this.channelListSetter);
1250
1250
  }
1251
1251
  else {
1252
- _this.handleRemovedFromChannelNotification(notification);
1252
+ _this.handleRemovedFromChannelNotification(clientEvent);
1253
1253
  }
1254
1254
  });
1255
1255
  }
1256
1256
  }
1257
1257
  };
1258
- ChannelService.prototype.handleRemovedFromChannelNotification = function (notification) {
1259
- var channelIdToBeRemoved = notification.event.channel.cid;
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 (notification) {
1263
- if (notification.event.channel) {
1264
- this.addChannelsFromNotification([notification.event.channel]);
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 (notification) {
1268
- if (notification.event.channel) {
1269
- this.addChannelsFromNotification([notification.event.channel]);
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) {