stream-chat-angular 4.39.8 → 4.40.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.
@@ -1 +1 @@
1
- export declare const version = "4.39.8";
1
+ export declare const version = "4.40.0";
@@ -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.39.8';
359
+ var version = '4.40.0';
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.
@@ -1655,7 +1655,7 @@
1655
1655
  }
1656
1656
  latestMessage.readBy = getReadBy(latestMessage, channel);
1657
1657
  messages[messages.length - 1] = Object.assign({}, latestMessage);
1658
- _this.activeChannelMessagesSubject.next(_this.activeChannelMessagesSubject.getValue());
1658
+ _this.activeChannelMessagesSubject.next(__spreadArray([], __read(messages)));
1659
1659
  });
1660
1660
  }));
1661
1661
  this.activeChannelSubscriptions.push(channel.on('typing.start', function (e) { return _this.ngZone.run(function () { return _this.handleTypingStartEvent(e); }); }));
@@ -1751,14 +1751,16 @@
1751
1751
  });
1752
1752
  };
1753
1753
  ChannelService.prototype.formatMessage = function (message) {
1754
- return Object.assign(Object.assign({}, message), {
1755
- // parse the date..
1756
- pinned_at: message.pinned_at ? new Date(message.pinned_at) : null, created_at: message.created_at
1757
- ? new Date(message.created_at)
1758
- : new Date(), updated_at: message.updated_at
1759
- ? new Date(message.updated_at)
1760
- : new Date(), status: message.status || 'received'
1761
- });
1754
+ var m = message;
1755
+ m.pinned_at = message.pinned_at ? new Date(message.pinned_at) : null;
1756
+ m.created_at = message.created_at
1757
+ ? new Date(message.created_at)
1758
+ : new Date();
1759
+ m.updated_at = message.updated_at
1760
+ ? new Date(message.updated_at)
1761
+ : new Date();
1762
+ message.status = message.status || 'received';
1763
+ return m;
1762
1764
  };
1763
1765
  ChannelService.prototype.isStreamMessage = function (message) {
1764
1766
  return !!message.readBy;
@@ -1981,22 +1983,26 @@
1981
1983
  }
1982
1984
  else {
1983
1985
  if (message.quoted_message) {
1984
- message.quoted_message = Object.assign(Object.assign({}, message.quoted_message), { translation: getMessageTranslation(message.quoted_message, channel, this.chatClientService.chatClient.user) });
1986
+ message.quoted_message.translation = getMessageTranslation(message.quoted_message, channel, this.chatClientService.chatClient.user);
1985
1987
  }
1986
1988
  if (this.isFormatMessageResponse(message)) {
1987
- return Object.assign(Object.assign({}, message), { readBy: isThreadMessage
1988
- ? []
1989
- : channel
1990
- ? getReadBy(message, channel)
1991
- : [], translation: getMessageTranslation(message, channel, this.chatClientService.chatClient.user) });
1989
+ message.readBy = isThreadMessage
1990
+ ? []
1991
+ : channel
1992
+ ? getReadBy(message, channel)
1993
+ : [];
1994
+ message.translation = getMessageTranslation(message, channel, this.chatClientService.chatClient.user);
1995
+ return message;
1992
1996
  }
1993
1997
  else {
1994
- var formatMessage = this.formatMessage(message);
1995
- return Object.assign(Object.assign({}, formatMessage), { readBy: isThreadMessage
1996
- ? []
1997
- : channel
1998
- ? getReadBy(formatMessage, channel)
1999
- : [], translation: getMessageTranslation(message, channel, this.chatClientService.chatClient.user) });
1998
+ message = this.formatMessage(message);
1999
+ message.readBy = isThreadMessage
2000
+ ? []
2001
+ : channel
2002
+ ? getReadBy(message, channel)
2003
+ : [];
2004
+ message.translation = getMessageTranslation(message, channel, this.chatClientService.chatClient.user);
2005
+ return message;
2000
2006
  }
2001
2007
  }
2002
2008
  };
@@ -6351,7 +6357,7 @@
6351
6357
  this.forceRepaint();
6352
6358
  };
6353
6359
  MessageListComponent.prototype.forceRepaint = function () {
6354
- // Solves the issue of empty screen on iOS Safari when scrolling
6360
+ // Solves the issue of empty screen on Safari when scrolling
6355
6361
  this.scrollContainer.nativeElement.style.display = 'none';
6356
6362
  this.scrollContainer.nativeElement.offsetHeight; // no need to store this anywhere, the reference is enough
6357
6363
  this.scrollContainer.nativeElement.style.display = '';