webitel-sdk 0.1.126 → 0.1.129

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.
@@ -24667,6 +24667,16 @@ class Task {
24667
24667
  get attempt() {
24668
24668
  return this;
24669
24669
  }
24670
+ get variables() {
24671
+ const res = {};
24672
+ for (const k in this.distribute.variables) {
24673
+ if (k.startsWith('cc_')) {
24674
+ continue;
24675
+ }
24676
+ res[k] = this.distribute.variables[k];
24677
+ }
24678
+ return res;
24679
+ }
24670
24680
  get displayNumber() {
24671
24681
  return this.communication.destination;
24672
24682
  }
@@ -25532,7 +25542,7 @@ class Conversation {
25532
25542
  return !!this.inviteId;
25533
25543
  }
25534
25544
  get allowLeave() {
25535
- return (!!this.channelId && this.closedAt === 0) || true;
25545
+ return !!this.channelId && this.closedAt === 0;
25536
25546
  }
25537
25547
  get allowReporting() {
25538
25548
  return this.answeredAt > 0 && this.hasReporting;
@@ -26100,7 +26110,7 @@ class Client extends EventEmitter {
26100
26110
  return call.hangupAt > 0 && !this.hasAgentTask(call.task);
26101
26111
  }
26102
26112
  conversationDestroyed(conv) {
26103
- return conv.closedAt > 0 && !this.hasAgentTask(conv.task) && false;
26113
+ return conv.closedAt > 0 && !this.hasAgentTask(conv.task);
26104
26114
  }
26105
26115
  reportingChannelTask(task) {
26106
26116
  switch (task.channel) {