webitel-sdk 23.7.16 → 23.7.17
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/bundles/index.esm.js +9 -2
- package/bundles/index.esm.js.map +1 -1
- package/bundles/index.esm.min.js +1 -1
- package/bundles/index.esm.min.js.map +1 -1
- package/bundles/index.umd.js +9 -2
- package/bundles/index.umd.js.map +1 -1
- package/bundles/index.umd.min.js +1 -1
- package/bundles/index.umd.min.js.map +1 -1
- package/esm2015/socket/agent.js +9 -2
- package/esm2015/socket/agent.js.map +1 -1
- package/esm5/socket/agent.js +9 -2
- package/esm5/socket/agent.js.map +1 -1
- package/package.json +1 -1
- package/types/socket/agent.d.ts.map +1 -1
package/bundles/index.esm.js
CHANGED
|
@@ -43156,7 +43156,10 @@ class Agent {
|
|
|
43156
43156
|
if (e) {
|
|
43157
43157
|
this.waitingListCalls.length = 0;
|
|
43158
43158
|
this.waitingListChats.length = 0;
|
|
43159
|
-
|
|
43159
|
+
if (this.status !== AgentStatus.Online) {
|
|
43160
|
+
return;
|
|
43161
|
+
}
|
|
43162
|
+
for (const el of (e.calls || [])) {
|
|
43160
43163
|
this.waitingListCalls.push({
|
|
43161
43164
|
displayName: el.communication.name || '',
|
|
43162
43165
|
displayNumber: el.communication.destination || '',
|
|
@@ -43167,7 +43170,7 @@ class Agent {
|
|
|
43167
43170
|
wait: el.wait,
|
|
43168
43171
|
});
|
|
43169
43172
|
}
|
|
43170
|
-
for (const el of e.chats) {
|
|
43173
|
+
for (const el of (e.chats || [])) {
|
|
43171
43174
|
this.waitingListChats.push({
|
|
43172
43175
|
chat: el.communication.chat || '',
|
|
43173
43176
|
displayName: el.communication.name || '',
|
|
@@ -43351,6 +43354,10 @@ class Agent {
|
|
|
43351
43354
|
this.info.on_demand = e.on_demand || false;
|
|
43352
43355
|
this.initChannels(e.channels);
|
|
43353
43356
|
}
|
|
43357
|
+
else {
|
|
43358
|
+
this.waitingListCalls.length = 0;
|
|
43359
|
+
this.waitingListChats.length = 0;
|
|
43360
|
+
}
|
|
43354
43361
|
this.info.status = e.status;
|
|
43355
43362
|
this.info.status_payload = e.status_payload ? e.status_payload : null;
|
|
43356
43363
|
this.lastStatusChange = Date.now();
|