stream-chat 9.54.3 → 9.55.0
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/cjs/index.browser.js +15 -4
- package/dist/cjs/index.browser.js.map +2 -2
- package/dist/cjs/index.node.js +15 -4
- package/dist/cjs/index.node.js.map +2 -2
- package/dist/esm/index.mjs +15 -4
- package/dist/esm/index.mjs.map +2 -2
- package/dist/types/types.d.ts +24 -1
- package/package.json +1 -1
- package/src/client.ts +2 -2
- package/src/connection.ts +15 -1
- package/src/types.ts +29 -2
|
@@ -12113,7 +12113,18 @@ var StableWSConnection = class {
|
|
|
12113
12113
|
this._log("_reconnect() - Destroying current WS connection");
|
|
12114
12114
|
this._destroyCurrentWSConnection();
|
|
12115
12115
|
if (options.refreshToken) {
|
|
12116
|
-
|
|
12116
|
+
try {
|
|
12117
|
+
await this.client.tokenManager.loadToken();
|
|
12118
|
+
} catch (error) {
|
|
12119
|
+
this.isHealthy = false;
|
|
12120
|
+
this.consecutiveFailures += 1;
|
|
12121
|
+
this._log("_reconnect() - Failed to refresh the token", { error }, "warn");
|
|
12122
|
+
if (!this.isDisconnected) {
|
|
12123
|
+
this._log("_reconnect() - Going to try to reload token and reconnect");
|
|
12124
|
+
this._reconnect({ refreshToken: true });
|
|
12125
|
+
}
|
|
12126
|
+
return;
|
|
12127
|
+
}
|
|
12117
12128
|
if (this.isConnecting || this.isHealthy) {
|
|
12118
12129
|
this._log("_reconnect() - Abort (4) since already connecting or healthy");
|
|
12119
12130
|
return;
|
|
@@ -15528,7 +15539,7 @@ var StreamChat = class _StreamChat {
|
|
|
15528
15539
|
return this.userAgent;
|
|
15529
15540
|
}
|
|
15530
15541
|
if (!this.cachedUserAgent) {
|
|
15531
|
-
const version = "9.
|
|
15542
|
+
const version = "9.55.0";
|
|
15532
15543
|
const { name: sdkName, version: sdkVersion } = this.sdkIdentifier ?? {};
|
|
15533
15544
|
const { name: appName, version: appVersion } = this.appIdentifier ?? {};
|
|
15534
15545
|
const { os, model: deviceModel } = this.deviceIdentifier ?? {};
|
|
@@ -18158,9 +18169,9 @@ var StreamChat = class _StreamChat {
|
|
|
18158
18169
|
"Invalid delete user options. user must be one of [soft hard pruning]"
|
|
18159
18170
|
);
|
|
18160
18171
|
}
|
|
18161
|
-
if (typeof options.conversations !== "undefined" && !["soft", "hard"].includes(options.conversations)) {
|
|
18172
|
+
if (typeof options.conversations !== "undefined" && !["soft", "hard", "keep"].includes(options.conversations)) {
|
|
18162
18173
|
throw new Error(
|
|
18163
|
-
"Invalid delete user options. conversations must be one of [soft hard]"
|
|
18174
|
+
"Invalid delete user options. conversations must be one of [soft hard keep]"
|
|
18164
18175
|
);
|
|
18165
18176
|
}
|
|
18166
18177
|
if (typeof options.messages !== "undefined" && !["soft", "hard", "pruning"].includes(options.messages)) {
|