stream-chat 4.4.1 → 4.4.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.
package/dist/index.js CHANGED
@@ -3448,7 +3448,6 @@ var ClientState = /*#__PURE__*/function () {
3448
3448
  function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
3449
3449
 
3450
3450
  function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$2(Object(source), true).forEach(function (key) { _defineProperty__default['default'](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
3451
-
3452
3451
  var InsightMetrics = function InsightMetrics() {
3453
3452
  _classCallCheck__default['default'](this, InsightMetrics);
3454
3453
 
@@ -3458,9 +3457,12 @@ var InsightMetrics = function InsightMetrics() {
3458
3457
 
3459
3458
  _defineProperty__default['default'](this, "wsTotalFailures", void 0);
3460
3459
 
3460
+ _defineProperty__default['default'](this, "instanceClientId", void 0);
3461
+
3461
3462
  this.connectionStartTimestamp = null;
3462
3463
  this.wsTotalFailures = 0;
3463
3464
  this.wsConsecutiveFailures = 0;
3465
+ this.instanceClientId = randomId();
3464
3466
  };
3465
3467
  function buildWsFatalInsight(connection, event) {
3466
3468
  return _objectSpread$2({
@@ -3492,7 +3494,8 @@ function buildWsBaseInsight(connection) {
3492
3494
  ws_total_failures: connection.insightMetrics.wsTotalFailures,
3493
3495
  request_id: connection.requestID,
3494
3496
  online: typeof navigator !== 'undefined' ? (_navigator = navigator) === null || _navigator === void 0 ? void 0 : _navigator.onLine : null,
3495
- user_agent: typeof navigator !== 'undefined' ? (_navigator2 = navigator) === null || _navigator2 === void 0 ? void 0 : _navigator2.userAgent : null
3497
+ user_agent: typeof navigator !== 'undefined' ? (_navigator2 = navigator) === null || _navigator2 === void 0 ? void 0 : _navigator2.userAgent : null,
3498
+ instance_client_id: connection.insightMetrics.instanceClientId
3496
3499
  };
3497
3500
  }
3498
3501
 
@@ -8372,7 +8375,7 @@ var StreamChat = /*#__PURE__*/function () {
8372
8375
  }, {
8373
8376
  key: "getUserAgent",
8374
8377
  value: function getUserAgent() {
8375
- return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "4.4.1");
8378
+ return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "4.4.2");
8376
8379
  }
8377
8380
  }, {
8378
8381
  key: "setUserAgent",