stream-chat 9.36.0 → 9.36.1

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.
@@ -1336,7 +1336,7 @@ var ChannelState = class {
1336
1336
  if (message.user && this._channel?.cid) {
1337
1337
  this._channel.getClient().state.updateUserReference(message.user, this._channel.cid);
1338
1338
  }
1339
- if (initializing && message.id && this.threads[message.id]) {
1339
+ if (initializing && message.id && this.threads[message.id] && !this._channel.getClient().preventThreadCleanup) {
1340
1340
  delete this.threads[message.id];
1341
1341
  }
1342
1342
  const shouldSkipLastMessageAtUpdate = this._channel.getConfig()?.skip_last_msg_update_for_system_msgs && message.type === "system";
@@ -12561,6 +12561,11 @@ function isString2(x) {
12561
12561
  }
12562
12562
  var StreamChat = class _StreamChat {
12563
12563
  constructor(key, secretOrOptions, options) {
12564
+ /**
12565
+ * If true, we will not clean up threads when channel state is in initializing state.
12566
+ * The main use case for SDKs who do independent state recovery for channels.
12567
+ */
12568
+ this.preventThreadCleanup = false;
12564
12569
  this.nextRequestAbortController = null;
12565
12570
  /**
12566
12571
  * @private
@@ -14919,7 +14924,7 @@ var StreamChat = class _StreamChat {
14919
14924
  if (this.userAgent) {
14920
14925
  return this.userAgent;
14921
14926
  }
14922
- const version = "9.36.0";
14927
+ const version = "9.36.1";
14923
14928
  const clientBundle = "browser-esm";
14924
14929
  let userAgentString = "";
14925
14930
  if (this.sdkIdentifier) {