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.es.js CHANGED
@@ -3425,7 +3425,6 @@ var ClientState = /*#__PURE__*/function () {
3425
3425
  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; }
3426
3426
 
3427
3427
  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(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; }
3428
-
3429
3428
  var InsightMetrics = function InsightMetrics() {
3430
3429
  _classCallCheck(this, InsightMetrics);
3431
3430
 
@@ -3435,9 +3434,12 @@ var InsightMetrics = function InsightMetrics() {
3435
3434
 
3436
3435
  _defineProperty(this, "wsTotalFailures", void 0);
3437
3436
 
3437
+ _defineProperty(this, "instanceClientId", void 0);
3438
+
3438
3439
  this.connectionStartTimestamp = null;
3439
3440
  this.wsTotalFailures = 0;
3440
3441
  this.wsConsecutiveFailures = 0;
3442
+ this.instanceClientId = randomId();
3441
3443
  };
3442
3444
  function buildWsFatalInsight(connection, event) {
3443
3445
  return _objectSpread$2({
@@ -3469,7 +3471,8 @@ function buildWsBaseInsight(connection) {
3469
3471
  ws_total_failures: connection.insightMetrics.wsTotalFailures,
3470
3472
  request_id: connection.requestID,
3471
3473
  online: typeof navigator !== 'undefined' ? (_navigator = navigator) === null || _navigator === void 0 ? void 0 : _navigator.onLine : null,
3472
- user_agent: typeof navigator !== 'undefined' ? (_navigator2 = navigator) === null || _navigator2 === void 0 ? void 0 : _navigator2.userAgent : null
3474
+ user_agent: typeof navigator !== 'undefined' ? (_navigator2 = navigator) === null || _navigator2 === void 0 ? void 0 : _navigator2.userAgent : null,
3475
+ instance_client_id: connection.insightMetrics.instanceClientId
3473
3476
  };
3474
3477
  }
3475
3478
 
@@ -8349,7 +8352,7 @@ var StreamChat = /*#__PURE__*/function () {
8349
8352
  }, {
8350
8353
  key: "getUserAgent",
8351
8354
  value: function getUserAgent() {
8352
- return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "4.4.1");
8355
+ return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "4.4.2");
8353
8356
  }
8354
8357
  }, {
8355
8358
  key: "setUserAgent",