@vserifsaglam/chat-react-client 1.0.4 → 1.0.5

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
@@ -191,6 +191,26 @@ function _finallyRethrows(body, finalizer) {
191
191
  return finalizer(false, result);
192
192
  }
193
193
 
194
+ function _extends() {
195
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
196
+ for (var e = 1; e < arguments.length; e++) {
197
+ var t = arguments[e];
198
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
199
+ }
200
+ return n;
201
+ }, _extends.apply(null, arguments);
202
+ }
203
+ function _objectWithoutPropertiesLoose(r, e) {
204
+ if (null == r) return {};
205
+ var t = {};
206
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
207
+ if (-1 !== e.indexOf(n)) continue;
208
+ t[n] = r[n];
209
+ }
210
+ return t;
211
+ }
212
+
213
+ var _excluded = ["isAppointment"];
194
214
  var ChatApi = /*#__PURE__*/function () {
195
215
  function ChatApi(config) {
196
216
  this.client = axios.create({
@@ -332,7 +352,9 @@ var ChatApi = /*#__PURE__*/function () {
332
352
  'x-disable-limit': true
333
353
  };
334
354
  }
335
- return Promise.resolve(_this1.client.post('/api/messages/send-message', message, config)).then(function (response) {
355
+ var isAppointment = message.isAppointment,
356
+ messageToSend = _objectWithoutPropertiesLoose(message, _excluded);
357
+ return Promise.resolve(_this1.client.post('/api/messages/send-message', messageToSend, config)).then(function (response) {
336
358
  return response.data;
337
359
  });
338
360
  } catch (e) {
@@ -485,16 +507,6 @@ var ChatApi = /*#__PURE__*/function () {
485
507
  return ChatApi;
486
508
  }();
487
509
 
488
- function _extends() {
489
- return _extends = Object.assign ? Object.assign.bind() : function (n) {
490
- for (var e = 1; e < arguments.length; e++) {
491
- var t = arguments[e];
492
- for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
493
- }
494
- return n;
495
- }, _extends.apply(null, arguments);
496
- }
497
-
498
510
  (function (ConnectionType) {
499
511
  ConnectionType["WebSocket"] = "websocket";
500
512
  ConnectionType["LongPolling"] = "longpolling";