stream-chat 8.40.3 → 8.40.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.
@@ -421,8 +421,10 @@ function addToMessageList(messages, newMessage) {
421
421
  } // for empty list just concat and return unless it's an update or deletion
422
422
 
423
423
 
424
- if (!newMessages.length && addMessageToList) {
424
+ if (newMessages.length === 0 && addMessageToList) {
425
425
  return newMessages.concat(newMessage);
426
+ } else if (newMessages.length === 0) {
427
+ return newMessages;
426
428
  } // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
427
429
 
428
430
 
@@ -432,6 +434,8 @@ function addToMessageList(messages, newMessage) {
432
434
 
433
435
  if (messageIsNewest && addMessageToList) {
434
436
  return newMessages.concat(newMessage);
437
+ } else if (messageIsNewest) {
438
+ return newMessages;
435
439
  } // find the closest index to push the new message
436
440
 
437
441
 
@@ -7334,6 +7338,7 @@ var MARK_AS_READ_THROTTLE_TIMEOUT = 1000;
7334
7338
  var Thread = /*#__PURE__*/function () {
7335
7339
  function Thread(_ref) {
7336
7340
  var _this = this,
7341
+ _threadData$channel$m,
7337
7342
  _threadData$read,
7338
7343
  _threadData$reply_cou;
7339
7344
 
@@ -7889,9 +7894,7 @@ var Thread = /*#__PURE__*/function () {
7889
7894
  name: threadData.channel.name
7890
7895
  });
7891
7896
 
7892
- if (threadData.channel.members) {
7893
- _channel._hydrateMembers(threadData.channel.members);
7894
- }
7897
+ _channel._hydrateMembers((_threadData$channel$m = threadData.channel.members) !== null && _threadData$channel$m !== void 0 ? _threadData$channel$m : []);
7895
7898
 
7896
7899
  this.state = new StateStore({
7897
7900
  active: false,
@@ -13327,7 +13330,7 @@ var StreamChat = /*#__PURE__*/function () {
13327
13330
  }, {
13328
13331
  key: "getUserAgent",
13329
13332
  value: function getUserAgent() {
13330
- return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.40.3");
13333
+ return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.40.5");
13331
13334
  }
13332
13335
  }, {
13333
13336
  key: "setUserAgent",