stream-chat-angular 4.52.0-support-angular-17.2 → 4.52.1

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 = "4.52.0-support-angular-17.2";
1
+ export declare const version = "4.52.1";
@@ -356,7 +356,7 @@
356
356
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
357
357
  }
358
358
 
359
- var version = '4.52.0-support-angular-17.2';
359
+ var version = '4.52.1';
360
360
 
361
361
  /**
362
362
  * The `NotificationService` can be used to add or remove notifications. By default the [`NotificationList`](../components/NotificationListComponent.mdx) component displays the currently active notifications.
@@ -465,6 +465,7 @@
465
465
  * @param userOrId you can emit this for anonymous logins
466
466
  * @param userTokenOrProvider You can provide:<ul>
467
467
  * <li> a token, </li>
468
+ * <li> a token provider, a method that returns `Promise<string>`, which can be called when the previous token expires (recommended setup for production applications)</li>
468
469
  * <li> the keyword 'guest' to connect as [guest user](https://getstream.io/chat/docs/javascript/authless_users/?language=javascript#guest-users) </li>
469
470
  * <li> the keyword 'anonymous' to connect as [anonymous user](https://getstream.io/chat/docs/javascript/authless_users/?language=javascript#anonymous-users) </li>
470
471
  * </ul>
@@ -1779,6 +1780,7 @@
1779
1780
  this.activeChannelSubscriptions.push(channel.on('reaction.updated', function (e) { return _this.messageReactionEventReceived(e); }));
1780
1781
  this.activeChannelSubscriptions.push(channel.on('message.read', function (e) {
1781
1782
  _this.ngZone.run(function () {
1783
+ var _h;
1782
1784
  var latestMessage;
1783
1785
  var messages;
1784
1786
  _this.activeChannelMessages$.pipe(operators.first()).subscribe(function (m) {
@@ -1788,7 +1790,13 @@
1788
1790
  if (!latestMessage || !e.user) {
1789
1791
  return;
1790
1792
  }
1791
- latestMessage.readBy = getReadBy(latestMessage, channel);
1793
+ if (latestMessage.readBy) {
1794
+ latestMessage.readBy.splice(0, latestMessage.readBy.length);
1795
+ }
1796
+ else {
1797
+ latestMessage.readBy = [];
1798
+ }
1799
+ (_h = latestMessage.readBy).push.apply(_h, __spreadArray([], __read(getReadBy(latestMessage, channel))));
1792
1800
  messages[messages.length - 1] = Object.assign({}, latestMessage);
1793
1801
  _this.activeChannelMessagesSubject.next(__spreadArray([], __read(messages)));
1794
1802
  });