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.js CHANGED
@@ -463,7 +463,7 @@ function addToMessageList(messages, newMessage) {
463
463
 
464
464
  if (messageIsNewest && addMessageToList) {
465
465
  return newMessages.concat(newMessage);
466
- } else if (newMessages.length === 0) {
466
+ } else if (messageIsNewest) {
467
467
  return newMessages;
468
468
  } // find the closest index to push the new message
469
469
 
@@ -7369,6 +7369,7 @@ var MARK_AS_READ_THROTTLE_TIMEOUT = 1000;
7369
7369
  var Thread = /*#__PURE__*/function () {
7370
7370
  function Thread(_ref) {
7371
7371
  var _this = this,
7372
+ _threadData$channel$m,
7372
7373
  _threadData$read,
7373
7374
  _threadData$reply_cou;
7374
7375
 
@@ -7924,9 +7925,7 @@ var Thread = /*#__PURE__*/function () {
7924
7925
  name: threadData.channel.name
7925
7926
  });
7926
7927
 
7927
- if (threadData.channel.members) {
7928
- _channel._hydrateMembers(threadData.channel.members);
7929
- }
7928
+ _channel._hydrateMembers((_threadData$channel$m = threadData.channel.members) !== null && _threadData$channel$m !== void 0 ? _threadData$channel$m : []);
7930
7929
 
7931
7930
  this.state = new StateStore({
7932
7931
  active: false,
@@ -8667,7 +8666,7 @@ var ThreadManager = /*#__PURE__*/function () {
8667
8666
 
8668
8667
  _context.next = 11;
8669
8668
  return _this.queryThreads({
8670
- limit: Math.min(limit, MAX_QUERY_THREADS_LIMIT)
8669
+ limit: Math.min(limit, MAX_QUERY_THREADS_LIMIT) || MAX_QUERY_THREADS_LIMIT
8671
8670
  });
8672
8671
 
8673
8672
  case 11:
@@ -13362,7 +13361,7 @@ var StreamChat = /*#__PURE__*/function () {
13362
13361
  }, {
13363
13362
  key: "getUserAgent",
13364
13363
  value: function getUserAgent() {
13365
- return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.40.4");
13364
+ return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.40.6");
13366
13365
  }
13367
13366
  }, {
13368
13367
  key: "setUserAgent",