@webex/plugin-meetings 3.8.1-next.27 → 3.8.1-next.29

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.
@@ -1426,6 +1426,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1426
1426
  key: "createMeeting",
1427
1427
  value: (function () {
1428
1428
  var _createMeeting = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(destination) {
1429
+ var _this12 = this;
1429
1430
  var type,
1430
1431
  useRandomDelayForInfo,
1431
1432
  infoExtraParams,
@@ -1472,9 +1473,10 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1472
1473
  }, {
1473
1474
  // @ts-ignore
1474
1475
  parent: this.webex
1476
+ }, function (newMeeting) {
1477
+ _this12.meetingCollection.set(newMeeting);
1475
1478
  });
1476
- this.meetingCollection.set(meeting);
1477
- _context3.prev = 9;
1479
+ _context3.prev = 8;
1478
1480
  // if no participant has joined the scheduled meeting (meaning meeting is not active) and we get a locusEvent,
1479
1481
  // it means the meeting will start in 5-6 min. In that case, we want to fetchMeetingInfo
1480
1482
  // between 5 and 2 min (random between 3 minutes) before the meeting starts
@@ -1495,56 +1497,56 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1495
1497
  sendCAevents: !!(callStateForMetrics !== null && callStateForMetrics !== void 0 && callStateForMetrics.correlationId) // if client sends correlation id as argument of public create(), then it means that this meeting creation is part of a pre-join intent from user
1496
1498
  };
1497
1499
  if (!meetingInfo) {
1498
- _context3.next = 19;
1500
+ _context3.next = 18;
1499
1501
  break;
1500
1502
  }
1501
1503
  meeting.injectMeetingInfo(meetingInfo, meetingInfoOptions, meetingLookupUrl);
1502
- _context3.next = 27;
1504
+ _context3.next = 26;
1503
1505
  break;
1504
- case 19:
1506
+ case 18:
1505
1507
  if (!(type !== _constants.DESTINATION_TYPE.ONE_ON_ONE_CALL)) {
1506
- _context3.next = 27;
1508
+ _context3.next = 26;
1507
1509
  break;
1508
1510
  }
1509
1511
  if (!(enableUnifiedMeetings && !isMeetingActive && useRandomDelayForInfo && waitingTime > 0)) {
1510
- _context3.next = 25;
1512
+ _context3.next = 24;
1511
1513
  break;
1512
1514
  }
1513
1515
  meeting.fetchMeetingInfoTimeoutId = setTimeout(function () {
1514
1516
  return meeting.fetchMeetingInfo(meetingInfoOptions);
1515
1517
  }, waitingTime);
1516
1518
  meeting.parseMeetingInfo(undefined, destination);
1517
- _context3.next = 27;
1519
+ _context3.next = 26;
1518
1520
  break;
1519
- case 25:
1520
- _context3.next = 27;
1521
+ case 24:
1522
+ _context3.next = 26;
1521
1523
  return meeting.fetchMeetingInfo(meetingInfoOptions);
1522
- case 27:
1523
- _context3.next = 39;
1524
+ case 26:
1525
+ _context3.next = 38;
1524
1526
  break;
1525
- case 29:
1526
- _context3.prev = 29;
1527
- _context3.t0 = _context3["catch"](9);
1527
+ case 28:
1528
+ _context3.prev = 28;
1529
+ _context3.t0 = _context3["catch"](8);
1528
1530
  if (!(!(_context3.t0 instanceof _captchaError.default) && !(_context3.t0 instanceof _passwordError.default) && !(_context3.t0 instanceof _permission.default) && !(_context3.t0 instanceof _joinWebinarError.default) && !(_context3.t0 instanceof _joinForbiddenError.default))) {
1529
- _context3.next = 38;
1531
+ _context3.next = 37;
1530
1532
  break;
1531
1533
  }
1532
1534
  _loggerProxy.default.logger.info("Meetings:index#createMeeting --> Info Unable to fetch meeting info for ".concat(destination, "."));
1533
1535
  if (!failOnMissingMeetingInfo) {
1534
- _context3.next = 37;
1536
+ _context3.next = 36;
1535
1537
  break;
1536
1538
  }
1537
1539
  _loggerProxy.default.logger.info("Meetings:index#createMeeting --> Destroying meeting due to missing meeting info.");
1538
1540
  // @ts-ignore
1539
1541
  this.destroy(meeting, _constants.MEETING_REMOVED_REASON.MISSING_MEETING_INFO);
1540
1542
  throw new _noMeetingInfo.default();
1541
- case 37:
1543
+ case 36:
1542
1544
  // if there is no meeting info and no error should be thrown then we assume its a 1:1 call or wireless share
1543
1545
  _loggerProxy.default.logger.info('Meetings:index#createMeeting --> Info assuming this destination is a 1:1 or wireless share');
1544
- case 38:
1546
+ case 37:
1545
1547
  _loggerProxy.default.logger.debug("Meetings:index#createMeeting --> Debug ".concat(_context3.t0, " fetching /meetingInfo for creation."));
1546
- case 39:
1547
- _context3.prev = 39;
1548
+ case 38:
1549
+ _context3.prev = 38;
1548
1550
  // For type LOCUS_ID we need to parse the locus object to get the information
1549
1551
  // about the caller and callee
1550
1552
  // Meeting Added event will be created in `handleLocusEvent`
@@ -1564,14 +1566,14 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1564
1566
  type: meetingAddedType
1565
1567
  });
1566
1568
  }
1567
- return _context3.finish(39);
1568
- case 42:
1569
+ return _context3.finish(38);
1570
+ case 41:
1569
1571
  return _context3.abrupt("return", meeting);
1570
- case 43:
1572
+ case 42:
1571
1573
  case "end":
1572
1574
  return _context3.stop();
1573
1575
  }
1574
- }, _callee3, this, [[9, 29, 39, 42]]);
1576
+ }, _callee3, this, [[8, 28, 38, 41]]);
1575
1577
  }));
1576
1578
  function createMeeting(_x3) {
1577
1579
  return _createMeeting.apply(this, arguments);
@@ -1615,7 +1617,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1615
1617
  }, {
1616
1618
  key: "syncMeetings",
1617
1619
  value: function syncMeetings() {
1618
- var _this12 = this;
1620
+ var _this13 = this;
1619
1621
  var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
1620
1622
  _ref3$keepOnlyLocusMe = _ref3.keepOnlyLocusMeetings,
1621
1623
  keepOnlyLocusMeetings = _ref3$keepOnlyLocusMe === void 0 ? true : _ref3$keepOnlyLocusMe;
@@ -1627,16 +1629,16 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1627
1629
  return this.request.getActiveMeetings().then(function (locusArray) {
1628
1630
  var activeLocusUrl = [];
1629
1631
  if (locusArray !== null && locusArray !== void 0 && locusArray.loci && locusArray.loci.length > 0) {
1630
- var lociToUpdate = _this12.sortLocusArrayToUpdate(locusArray.loci);
1632
+ var lociToUpdate = _this13.sortLocusArrayToUpdate(locusArray.loci);
1631
1633
  lociToUpdate.forEach(function (locus) {
1632
1634
  activeLocusUrl.push(locus.url);
1633
- _this12.handleLocusEvent({
1635
+ _this13.handleLocusEvent({
1634
1636
  locus: locus,
1635
1637
  locusUrl: locus.url
1636
1638
  });
1637
1639
  });
1638
1640
  }
1639
- var meetingsCollection = _this12.meetingCollection.getAll();
1641
+ var meetingsCollection = _this13.meetingCollection.getAll();
1640
1642
  if ((0, _keys.default)(meetingsCollection).length > 0) {
1641
1643
  // Sometimes the mercury events are lost after mercury reconnect
1642
1644
  // Remove any Locus meetings that are not returned by Locus
@@ -1648,7 +1650,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1648
1650
  if ((keepOnlyLocusMeetings || locusUrl) && !activeLocusUrl.includes(locusUrl)) {
1649
1651
  // destroy function also uploads logs
1650
1652
  // @ts-ignore
1651
- _this12.destroy(meeting, _constants.MEETING_REMOVED_REASON.NO_MEETINGS_TO_SYNC);
1653
+ _this13.destroy(meeting, _constants.MEETING_REMOVED_REASON.NO_MEETINGS_TO_SYNC);
1652
1654
  }
1653
1655
  }
1654
1656
  }
@@ -1668,7 +1670,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1668
1670
  }, {
1669
1671
  key: "sortLocusArrayToUpdate",
1670
1672
  value: function sortLocusArrayToUpdate(loci) {
1671
- var _this13 = this;
1673
+ var _this14 = this;
1672
1674
  var mainLoci = loci.filter(function (locus) {
1673
1675
  return !_util2.default.isBreakoutLocusDTO(locus);
1674
1676
  });
@@ -1682,7 +1684,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1682
1684
  var _mainLocus$controls, _mainLocus$controls$b, _breakoutLocus$contro, _breakoutLocus$contro2;
1683
1685
  return ((_mainLocus$controls = mainLocus.controls) === null || _mainLocus$controls === void 0 ? void 0 : (_mainLocus$controls$b = _mainLocus$controls.breakout) === null || _mainLocus$controls$b === void 0 ? void 0 : _mainLocus$controls$b.url) === ((_breakoutLocus$contro = breakoutLocus.controls) === null || _breakoutLocus$contro === void 0 ? void 0 : (_breakoutLocus$contro2 = _breakoutLocus$contro.breakout) === null || _breakoutLocus$contro2 === void 0 ? void 0 : _breakoutLocus$contro2.url);
1684
1686
  });
1685
- var existCorrespondingMeeting = _this13.getCorrespondingMeetingByLocus({
1687
+ var existCorrespondingMeeting = _this14.getCorrespondingMeetingByLocus({
1686
1688
  locus: breakoutLocus,
1687
1689
  locusUrl: breakoutLocus.url
1688
1690
  });
@@ -1690,7 +1692,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1690
1692
  // if exists both main session and breakout session locus of the same non-exist meeting, handle main locus first,
1691
1693
  // after meeting create with main locus, then handle the associate breakout locus.
1692
1694
  // if only handle breakout locus, will miss some date
1693
- _this13.breakoutLocusForHandleLater.push(breakoutLocus);
1695
+ _this14.breakoutLocusForHandleLater.push(breakoutLocus);
1694
1696
  } else {
1695
1697
  lociToUpdate.push(breakoutLocus);
1696
1698
  }