stream-chat 9.36.0 → 9.36.2

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.
@@ -1525,7 +1525,7 @@ var ChannelState = class {
1525
1525
  if (message.user && this._channel?.cid) {
1526
1526
  this._channel.getClient().state.updateUserReference(message.user, this._channel.cid);
1527
1527
  }
1528
- if (initializing && message.id && this.threads[message.id]) {
1528
+ if (initializing && message.id && this.threads[message.id] && !this._channel.getClient().preventThreadCleanup) {
1529
1529
  delete this.threads[message.id];
1530
1530
  }
1531
1531
  const shouldSkipLastMessageAtUpdate = this._channel.getConfig()?.skip_last_msg_update_for_system_msgs && message.type === "system";
@@ -12750,6 +12750,11 @@ function isString2(x) {
12750
12750
  }
12751
12751
  var StreamChat = class _StreamChat {
12752
12752
  constructor(key, secretOrOptions, options) {
12753
+ /**
12754
+ * If true, we will not clean up threads when channel state is in initializing state.
12755
+ * The main use case for SDKs who do independent state recovery for channels.
12756
+ */
12757
+ this.preventThreadCleanup = false;
12753
12758
  this.nextRequestAbortController = null;
12754
12759
  /**
12755
12760
  * @private
@@ -15108,7 +15113,7 @@ var StreamChat = class _StreamChat {
15108
15113
  if (this.userAgent) {
15109
15114
  return this.userAgent;
15110
15115
  }
15111
- const version = "9.36.0";
15116
+ const version = "9.36.2";
15112
15117
  const clientBundle = "browser-cjs";
15113
15118
  let userAgentString = "";
15114
15119
  if (this.sdkIdentifier) {