@webex/plugin-meetings 3.12.0-next.20 → 3.12.0-next.22
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/aiEnableRequest/index.js +1 -1
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/hashTree/hashTreeParser.js +480 -320
- package/dist/hashTree/hashTreeParser.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/index.js +170 -36
- package/dist/locus-info/index.js.map +1 -1
- package/dist/meetings/index.js +130 -45
- package/dist/meetings/index.js.map +1 -1
- package/dist/types/hashTree/hashTreeParser.d.ts +40 -12
- package/dist/types/locus-info/index.d.ts +29 -0
- package/dist/webinar/index.js +1 -1
- package/package.json +14 -14
- package/src/hashTree/hashTreeParser.ts +182 -97
- package/src/locus-info/index.ts +176 -48
- package/src/meetings/index.ts +42 -17
- package/test/unit/spec/hashTree/hashTreeParser.ts +372 -7
- package/test/unit/spec/locus-info/index.js +179 -4
- package/test/unit/spec/meetings/index.js +127 -5
package/dist/meetings/index.js
CHANGED
|
@@ -64,7 +64,7 @@ var _noMeetingInfo = _interopRequireDefault(require("../common/errors/no-meeting
|
|
|
64
64
|
var _joinForbiddenError = _interopRequireDefault(require("../common/errors/join-forbidden-error"));
|
|
65
65
|
var _utils = require("../hashTree/utils");
|
|
66
66
|
var _locusInfo = require("../locus-info");
|
|
67
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof _WeakMap) var r = new _WeakMap(), n = new _WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var
|
|
67
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof _WeakMap) var r = new _WeakMap(), n = new _WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t4 in e) "default" !== _t4 && {}.hasOwnProperty.call(e, _t4) && ((i = (o = _Object$defineProperty) && _Object$getOwnPropertyDescriptor(e, _t4)) && (i.get || i.set) ? o(f, _t4, i) : f[_t4] = e[_t4]); return f; })(e, t); }
|
|
68
68
|
function ownKeys(e, r) { var t = _Object$keys2(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
69
69
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
70
70
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
@@ -1742,51 +1742,135 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
1742
1742
|
*/
|
|
1743
1743
|
}, {
|
|
1744
1744
|
key: "syncMeetings",
|
|
1745
|
-
value: function
|
|
1746
|
-
var
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1745
|
+
value: (function () {
|
|
1746
|
+
var _syncMeetings = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee5() {
|
|
1747
|
+
var _this11 = this;
|
|
1748
|
+
var _ref4,
|
|
1749
|
+
_ref4$keepOnlyLocusMe,
|
|
1750
|
+
keepOnlyLocusMeetings,
|
|
1751
|
+
locusArray,
|
|
1752
|
+
activeLocusUrl,
|
|
1753
|
+
lociToUpdate,
|
|
1754
|
+
meetingsCollection,
|
|
1755
|
+
_loop,
|
|
1756
|
+
_i,
|
|
1757
|
+
_Object$values,
|
|
1758
|
+
remainingMeetings,
|
|
1759
|
+
syncPromises,
|
|
1760
|
+
_i2,
|
|
1761
|
+
_arr,
|
|
1762
|
+
meeting,
|
|
1763
|
+
_args6 = arguments,
|
|
1764
|
+
_t3;
|
|
1765
|
+
return _regenerator.default.wrap(function (_context6) {
|
|
1766
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
1767
|
+
case 0:
|
|
1768
|
+
_ref4 = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {}, _ref4$keepOnlyLocusMe = _ref4.keepOnlyLocusMeetings, keepOnlyLocusMeetings = _ref4$keepOnlyLocusMe === void 0 ? true : _ref4$keepOnlyLocusMe;
|
|
1769
|
+
if (!this.webex.credentials.isUnverifiedGuest) {
|
|
1770
|
+
_context6.next = 1;
|
|
1771
|
+
break;
|
|
1772
|
+
}
|
|
1773
|
+
_loggerProxy.default.logger.info('Meetings:index#syncMeetings --> user is unverified guest, skipping calling Locus for meeting sync');
|
|
1774
|
+
_context6.next = 7;
|
|
1775
|
+
break;
|
|
1776
|
+
case 1:
|
|
1777
|
+
_context6.prev = 1;
|
|
1778
|
+
_context6.next = 2;
|
|
1779
|
+
return this.request.getActiveMeetings();
|
|
1780
|
+
case 2:
|
|
1781
|
+
locusArray = _context6.sent;
|
|
1782
|
+
activeLocusUrl = [];
|
|
1783
|
+
if (locusArray !== null && locusArray !== void 0 && locusArray.loci && locusArray.loci.length > 0) {
|
|
1784
|
+
lociToUpdate = this.sortLocusArrayToUpdate(locusArray.loci);
|
|
1785
|
+
lociToUpdate.forEach(function (locus) {
|
|
1786
|
+
activeLocusUrl.push(locus.url);
|
|
1787
|
+
_this11.handleLocusEvent({
|
|
1788
|
+
eventType: _constants.LOCUSEVENT.SDK_LOCUS_FROM_SYNC_MEETINGS,
|
|
1789
|
+
locus: locus,
|
|
1790
|
+
locusUrl: locus.url
|
|
1791
|
+
});
|
|
1792
|
+
});
|
|
1793
|
+
}
|
|
1794
|
+
meetingsCollection = this.meetingCollection.getAll();
|
|
1795
|
+
if (!((0, _keys.default)(meetingsCollection).length > 0)) {
|
|
1796
|
+
_context6.next = 5;
|
|
1797
|
+
break;
|
|
1798
|
+
}
|
|
1799
|
+
_loop = /*#__PURE__*/_regenerator.default.mark(function _loop() {
|
|
1800
|
+
var meeting, locusUrl, locusInfo, _locusInfo$info, _locusArray$loci, globalMeetingId;
|
|
1801
|
+
return _regenerator.default.wrap(function (_context5) {
|
|
1802
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
1803
|
+
case 0:
|
|
1804
|
+
meeting = _Object$values[_i];
|
|
1805
|
+
// @ts-ignore
|
|
1806
|
+
locusUrl = meeting.locusUrl, locusInfo = meeting.locusInfo;
|
|
1807
|
+
if ((keepOnlyLocusMeetings || locusUrl) && !activeLocusUrl.includes(locusUrl)) {
|
|
1808
|
+
globalMeetingId = locusInfo === null || locusInfo === void 0 ? void 0 : (_locusInfo$info = locusInfo.info) === null || _locusInfo$info === void 0 ? void 0 : _locusInfo$info.globalMeetingId;
|
|
1809
|
+
if (globalMeetingId && locusArray !== null && locusArray !== void 0 && (_locusArray$loci = locusArray.loci) !== null && _locusArray$loci !== void 0 && _locusArray$loci.some(function (locus) {
|
|
1810
|
+
var _locus$info;
|
|
1811
|
+
return ((_locus$info = locus.info) === null || _locus$info === void 0 ? void 0 : _locus$info.globalMeetingId) === globalMeetingId;
|
|
1812
|
+
})) {
|
|
1813
|
+
// don't destroy the meeting as Locus API still returned some Locus that shares
|
|
1814
|
+
// the same globalMeetingId - that happens for example if a webinar user (who hasn't scheduled it)
|
|
1815
|
+
// is in a breakout and gets moved to a different breakout while we were offline
|
|
1816
|
+
} else {
|
|
1817
|
+
// destroy function also uploads logs
|
|
1818
|
+
// @ts-ignore
|
|
1819
|
+
_this11.destroy(meeting, _constants.MEETING_REMOVED_REASON.NO_MEETINGS_TO_SYNC);
|
|
1820
|
+
}
|
|
1821
|
+
}
|
|
1822
|
+
case 1:
|
|
1823
|
+
case "end":
|
|
1824
|
+
return _context5.stop();
|
|
1825
|
+
}
|
|
1826
|
+
}, _loop);
|
|
1827
|
+
});
|
|
1828
|
+
_i = 0, _Object$values = (0, _values.default)(meetingsCollection);
|
|
1829
|
+
case 3:
|
|
1830
|
+
if (!(_i < _Object$values.length)) {
|
|
1831
|
+
_context6.next = 5;
|
|
1832
|
+
break;
|
|
1833
|
+
}
|
|
1834
|
+
return _context6.delegateYield(_loop(), "t0", 4);
|
|
1835
|
+
case 4:
|
|
1836
|
+
_i++;
|
|
1837
|
+
_context6.next = 3;
|
|
1838
|
+
break;
|
|
1839
|
+
case 5:
|
|
1840
|
+
_context6.next = 7;
|
|
1841
|
+
break;
|
|
1842
|
+
case 6:
|
|
1843
|
+
_context6.prev = 6;
|
|
1844
|
+
_t3 = _context6["catch"](1);
|
|
1845
|
+
_loggerProxy.default.logger.error("Meetings:index#syncMeetings --> failed to sync meetings, ".concat(_t3));
|
|
1846
|
+
throw _t3;
|
|
1847
|
+
case 7:
|
|
1848
|
+
// Trigger hash tree syncs for all remaining meetings
|
|
1849
|
+
remainingMeetings = this.meetingCollection.getAll();
|
|
1850
|
+
syncPromises = [];
|
|
1851
|
+
for (_i2 = 0, _arr = (0, _values.default)(remainingMeetings); _i2 < _arr.length; _i2++) {
|
|
1852
|
+
meeting = _arr[_i2];
|
|
1853
|
+
if (meeting.locusInfo) {
|
|
1854
|
+
syncPromises.push(meeting.locusInfo.syncAllHashTreeDatasets());
|
|
1855
|
+
}
|
|
1856
|
+
}
|
|
1857
|
+
if (!(syncPromises.length > 0)) {
|
|
1858
|
+
_context6.next = 8;
|
|
1859
|
+
break;
|
|
1860
|
+
}
|
|
1861
|
+
_context6.next = 8;
|
|
1862
|
+
return _promise.default.all(syncPromises);
|
|
1863
|
+
case 8:
|
|
1864
|
+
case "end":
|
|
1865
|
+
return _context6.stop();
|
|
1782
1866
|
}
|
|
1783
|
-
}
|
|
1784
|
-
})
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
}
|
|
1788
|
-
|
|
1789
|
-
|
|
1867
|
+
}, _callee5, this, [[1, 6]]);
|
|
1868
|
+
}));
|
|
1869
|
+
function syncMeetings() {
|
|
1870
|
+
return _syncMeetings.apply(this, arguments);
|
|
1871
|
+
}
|
|
1872
|
+
return syncMeetings;
|
|
1873
|
+
}()
|
|
1790
1874
|
/**
|
|
1791
1875
|
* sort out locus array for initial creating
|
|
1792
1876
|
* @param {Array} loci original locus array
|
|
@@ -1794,6 +1878,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
1794
1878
|
* @public
|
|
1795
1879
|
* @memberof Meetings
|
|
1796
1880
|
*/
|
|
1881
|
+
)
|
|
1797
1882
|
}, {
|
|
1798
1883
|
key: "sortLocusArrayToUpdate",
|
|
1799
1884
|
value: function sortLocusArrayToUpdate(loci) {
|