@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 +23 -11
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +23 -11
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -188,6 +188,26 @@ function _finallyRethrows(body, finalizer) {
|
|
|
188
188
|
return finalizer(false, result);
|
|
189
189
|
}
|
|
190
190
|
|
|
191
|
+
function _extends() {
|
|
192
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
193
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
194
|
+
var t = arguments[e];
|
|
195
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
196
|
+
}
|
|
197
|
+
return n;
|
|
198
|
+
}, _extends.apply(null, arguments);
|
|
199
|
+
}
|
|
200
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
201
|
+
if (null == r) return {};
|
|
202
|
+
var t = {};
|
|
203
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
204
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
205
|
+
t[n] = r[n];
|
|
206
|
+
}
|
|
207
|
+
return t;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
var _excluded = ["isAppointment"];
|
|
191
211
|
var ChatApi = /*#__PURE__*/function () {
|
|
192
212
|
function ChatApi(config) {
|
|
193
213
|
this.client = axios.create({
|
|
@@ -329,7 +349,9 @@ var ChatApi = /*#__PURE__*/function () {
|
|
|
329
349
|
'x-disable-limit': true
|
|
330
350
|
};
|
|
331
351
|
}
|
|
332
|
-
|
|
352
|
+
var isAppointment = message.isAppointment,
|
|
353
|
+
messageToSend = _objectWithoutPropertiesLoose(message, _excluded);
|
|
354
|
+
return Promise.resolve(_this1.client.post('/api/messages/send-message', messageToSend, config)).then(function (response) {
|
|
333
355
|
return response.data;
|
|
334
356
|
});
|
|
335
357
|
} catch (e) {
|
|
@@ -482,16 +504,6 @@ var ChatApi = /*#__PURE__*/function () {
|
|
|
482
504
|
return ChatApi;
|
|
483
505
|
}();
|
|
484
506
|
|
|
485
|
-
function _extends() {
|
|
486
|
-
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
487
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
488
|
-
var t = arguments[e];
|
|
489
|
-
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
490
|
-
}
|
|
491
|
-
return n;
|
|
492
|
-
}, _extends.apply(null, arguments);
|
|
493
|
-
}
|
|
494
|
-
|
|
495
507
|
var ConnectionType;
|
|
496
508
|
(function (ConnectionType) {
|
|
497
509
|
ConnectionType["WebSocket"] = "websocket";
|