stream-chat 8.12.1 → 8.12.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
@@ -1340,6 +1340,19 @@ function removeConnectionEventListeners(cb) {
1340
1340
  window.removeEventListener('online', cb);
1341
1341
  }
1342
1342
  }
1343
+ var axiosParamsSerializer = function axiosParamsSerializer(params) {
1344
+ var newParams = [];
1345
+
1346
+ for (var k in params) {
1347
+ if (Array.isArray(params[k]) || _typeof__default['default'](params[k]) === 'object') {
1348
+ newParams.push("".concat(k, "=").concat(encodeURIComponent(JSON.stringify(params[k]))));
1349
+ } else {
1350
+ newParams.push("".concat(k, "=").concat(encodeURIComponent(params[k])));
1351
+ }
1352
+ }
1353
+
1354
+ return newParams.join('&');
1355
+ };
1343
1356
 
1344
1357
  function _createForOfIteratorHelper$2(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$2(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
1345
1358
 
@@ -6944,6 +6957,7 @@ var StreamChat = /*#__PURE__*/function () {
6944
6957
  this.insightMetrics = new InsightMetrics();
6945
6958
  this.defaultWSTimeoutWithFallback = 6000;
6946
6959
  this.defaultWSTimeout = 15000;
6960
+ this.axiosInstance.defaults.paramsSerializer = axiosParamsSerializer;
6947
6961
  /**
6948
6962
  * logger function should accept 3 parameters:
6949
6963
  * @param logLevel string
@@ -10104,7 +10118,7 @@ var StreamChat = /*#__PURE__*/function () {
10104
10118
  }, {
10105
10119
  key: "getUserAgent",
10106
10120
  value: function getUserAgent() {
10107
- return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.12.1");
10121
+ return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.12.2");
10108
10122
  }
10109
10123
  }, {
10110
10124
  key: "setUserAgent",