stream-chat 6.5.0 → 6.5.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.
- package/dist/browser.es.js +18 -6
- package/dist/browser.es.js.map +1 -1
- package/dist/browser.full-bundle.min.js +1 -1
- package/dist/browser.full-bundle.min.js.map +1 -1
- package/dist/browser.js +18 -6
- package/dist/browser.js.map +1 -1
- package/dist/index.es.js +18 -6
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +18 -6
- package/dist/index.js.map +1 -1
- package/dist/types/client.d.ts +1 -1
- package/dist/types/client.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +9 -1
package/dist/browser.es.js
CHANGED
|
@@ -5962,7 +5962,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
5962
5962
|
}());
|
|
5963
5963
|
|
|
5964
5964
|
_defineProperty(this, "openConnection", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
|
5965
|
-
var _this$wsConnection3, _this$wsFallback3;
|
|
5965
|
+
var _this$wsConnection3, _this$wsConnection4, _this$wsFallback3;
|
|
5966
5966
|
|
|
5967
5967
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
5968
5968
|
while (1) {
|
|
@@ -5976,18 +5976,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
5976
5976
|
throw Error('User is not set on client, use client.connectUser or client.connectAnonymousUser instead');
|
|
5977
5977
|
|
|
5978
5978
|
case 2:
|
|
5979
|
-
if (!((
|
|
5979
|
+
if (!((_this$wsConnection3 = _this.wsConnection) !== null && _this$wsConnection3 !== void 0 && _this$wsConnection3.isConnecting)) {
|
|
5980
5980
|
_context3.next = 5;
|
|
5981
5981
|
break;
|
|
5982
5982
|
}
|
|
5983
5983
|
|
|
5984
|
-
_this.logger('info', 'client:openConnection() -
|
|
5984
|
+
_this.logger('info', 'client:openConnection() - connection already in progress', {
|
|
5985
5985
|
tags: ['connection', 'client']
|
|
5986
5986
|
});
|
|
5987
5987
|
|
|
5988
5988
|
return _context3.abrupt("return", Promise.resolve());
|
|
5989
5989
|
|
|
5990
5990
|
case 5:
|
|
5991
|
+
if (!(((_this$wsConnection4 = _this.wsConnection) !== null && _this$wsConnection4 !== void 0 && _this$wsConnection4.isHealthy || (_this$wsFallback3 = _this.wsFallback) !== null && _this$wsFallback3 !== void 0 && _this$wsFallback3.isHealthy()) && _this._hasConnectionID())) {
|
|
5992
|
+
_context3.next = 8;
|
|
5993
|
+
break;
|
|
5994
|
+
}
|
|
5995
|
+
|
|
5996
|
+
_this.logger('info', 'client:openConnection() - openConnection called twice, healthy connection already exists', {
|
|
5997
|
+
tags: ['connection', 'client']
|
|
5998
|
+
});
|
|
5999
|
+
|
|
6000
|
+
return _context3.abrupt("return", Promise.resolve());
|
|
6001
|
+
|
|
6002
|
+
case 8:
|
|
5991
6003
|
_this.clientID = "".concat(_this.userID, "--").concat(randomId());
|
|
5992
6004
|
_this.wsPromise = _this.connect();
|
|
5993
6005
|
|
|
@@ -5995,7 +6007,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
5995
6007
|
|
|
5996
6008
|
return _context3.abrupt("return", _this.wsPromise);
|
|
5997
6009
|
|
|
5998
|
-
case
|
|
6010
|
+
case 12:
|
|
5999
6011
|
case "end":
|
|
6000
6012
|
return _context3.stop();
|
|
6001
6013
|
}
|
|
@@ -7090,7 +7102,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7090
7102
|
}()
|
|
7091
7103
|
/**
|
|
7092
7104
|
* createToken - Creates a token to authenticate this user. This function is used server side.
|
|
7093
|
-
* The resulting token should be passed to the client side when the users registers or logs in
|
|
7105
|
+
* The resulting token should be passed to the client side when the users registers or logs in.
|
|
7094
7106
|
*
|
|
7095
7107
|
* @param {string} userID The User ID
|
|
7096
7108
|
* @param {number} [exp] The expiration time for the token expressed in the number of seconds since the epoch
|
|
@@ -9526,7 +9538,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9526
9538
|
}, {
|
|
9527
9539
|
key: "getUserAgent",
|
|
9528
9540
|
value: function getUserAgent() {
|
|
9529
|
-
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "6.5.
|
|
9541
|
+
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "6.5.1");
|
|
9530
9542
|
}
|
|
9531
9543
|
}, {
|
|
9532
9544
|
key: "setUserAgent",
|