stream-chat 8.40.4 → 8.40.6

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/dist/index.es.js CHANGED
@@ -435,7 +435,7 @@ function addToMessageList(messages, newMessage) {
435
435
 
436
436
  if (messageIsNewest && addMessageToList) {
437
437
  return newMessages.concat(newMessage);
438
- } else if (newMessages.length === 0) {
438
+ } else if (messageIsNewest) {
439
439
  return newMessages;
440
440
  } // find the closest index to push the new message
441
441
 
@@ -7341,6 +7341,7 @@ var MARK_AS_READ_THROTTLE_TIMEOUT = 1000;
7341
7341
  var Thread = /*#__PURE__*/function () {
7342
7342
  function Thread(_ref) {
7343
7343
  var _this = this,
7344
+ _threadData$channel$m,
7344
7345
  _threadData$read,
7345
7346
  _threadData$reply_cou;
7346
7347
 
@@ -7896,9 +7897,7 @@ var Thread = /*#__PURE__*/function () {
7896
7897
  name: threadData.channel.name
7897
7898
  });
7898
7899
 
7899
- if (threadData.channel.members) {
7900
- _channel._hydrateMembers(threadData.channel.members);
7901
- }
7900
+ _channel._hydrateMembers((_threadData$channel$m = threadData.channel.members) !== null && _threadData$channel$m !== void 0 ? _threadData$channel$m : []);
7902
7901
 
7903
7902
  this.state = new StateStore({
7904
7903
  active: false,
@@ -8639,7 +8638,7 @@ var ThreadManager = /*#__PURE__*/function () {
8639
8638
 
8640
8639
  _context.next = 11;
8641
8640
  return _this.queryThreads({
8642
- limit: Math.min(limit, MAX_QUERY_THREADS_LIMIT)
8641
+ limit: Math.min(limit, MAX_QUERY_THREADS_LIMIT) || MAX_QUERY_THREADS_LIMIT
8643
8642
  });
8644
8643
 
8645
8644
  case 11:
@@ -13334,7 +13333,7 @@ var StreamChat = /*#__PURE__*/function () {
13334
13333
  }, {
13335
13334
  key: "getUserAgent",
13336
13335
  value: function getUserAgent() {
13337
- return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.40.4");
13336
+ return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.40.6");
13338
13337
  }
13339
13338
  }, {
13340
13339
  key: "setUserAgent",