@webex/plugin-meetings 3.12.0-next.1 → 3.12.0-next.11
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/constants.js +10 -1
- package/dist/hashTree/constants.js.map +1 -1
- package/dist/hashTree/hashTreeParser.js +56 -31
- package/dist/hashTree/hashTreeParser.js.map +1 -1
- package/dist/hashTree/utils.js +22 -0
- package/dist/hashTree/utils.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/index.js +38 -14
- package/dist/locus-info/index.js.map +1 -1
- package/dist/meeting/index.js +427 -323
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/util.js +1 -0
- package/dist/meeting/util.js.map +1 -1
- package/dist/metrics/constants.js +5 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +116 -2
- package/dist/multistream/sendSlotManager.js.map +1 -1
- package/dist/types/hashTree/constants.d.ts +1 -0
- package/dist/types/hashTree/hashTreeParser.d.ts +12 -2
- package/dist/types/hashTree/utils.d.ts +11 -0
- package/dist/types/locus-info/index.d.ts +8 -3
- package/dist/types/meeting/index.d.ts +24 -1
- package/dist/types/metrics/constants.d.ts +4 -0
- package/dist/types/multistream/sendSlotManager.d.ts +23 -1
- package/dist/webinar/index.js +325 -220
- package/dist/webinar/index.js.map +1 -1
- package/package.json +15 -15
- package/src/hashTree/constants.ts +9 -0
- package/src/hashTree/hashTreeParser.ts +60 -36
- package/src/hashTree/utils.ts +17 -0
- package/src/locus-info/index.ts +48 -24
- package/src/meeting/index.ts +165 -57
- package/src/meeting/util.ts +1 -0
- package/src/metrics/constants.ts +5 -0
- package/src/multistream/sendSlotManager.ts +97 -3
- package/src/webinar/index.ts +120 -18
- package/test/unit/spec/hashTree/hashTreeParser.ts +295 -30
- package/test/unit/spec/hashTree/utils.ts +88 -1
- package/test/unit/spec/locus-info/index.js +47 -22
- package/test/unit/spec/meeting/index.js +179 -48
- package/test/unit/spec/meeting/utils.js +4 -0
- package/test/unit/spec/meetings/index.js +3 -3
- package/test/unit/spec/multistream/sendSlotManager.ts +135 -36
- package/test/unit/spec/webinar/index.ts +193 -8
|
@@ -178,7 +178,7 @@ var AIEnableRequest = _webexCore.WebexPlugin.extend({
|
|
|
178
178
|
method: _constants.HTTP_VERBS.PUT
|
|
179
179
|
});
|
|
180
180
|
},
|
|
181
|
-
version: "3.12.0-next.
|
|
181
|
+
version: "3.12.0-next.11"
|
|
182
182
|
});
|
|
183
183
|
var _default = exports.default = AIEnableRequest;
|
|
184
184
|
//# sourceMappingURL=index.js.map
|
package/dist/breakouts/index.js
CHANGED
|
@@ -1109,7 +1109,7 @@ var Breakouts = _webexCore.WebexPlugin.extend({
|
|
|
1109
1109
|
this.trigger(_constants.BREAKOUTS.EVENTS.ASK_RETURN_TO_MAIN);
|
|
1110
1110
|
}
|
|
1111
1111
|
},
|
|
1112
|
-
version: "3.12.0-next.
|
|
1112
|
+
version: "3.12.0-next.11"
|
|
1113
1113
|
});
|
|
1114
1114
|
var _default = exports.default = Breakouts;
|
|
1115
1115
|
//# sourceMappingURL=index.js.map
|
|
@@ -4,7 +4,7 @@ var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/defi
|
|
|
4
4
|
_Object$defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.EMPTY_HASH = exports.DataSetNames = void 0;
|
|
7
|
+
exports.EMPTY_HASH = exports.DataSetNames = exports.DATA_SET_INIT_PRIORITY = void 0;
|
|
8
8
|
var EMPTY_HASH = exports.EMPTY_HASH = '99aa06d3014798d86001c324468d497f';
|
|
9
9
|
var DataSetNames = exports.DataSetNames = {
|
|
10
10
|
MAIN: 'main',
|
|
@@ -19,4 +19,13 @@ var DataSetNames = exports.DataSetNames = {
|
|
|
19
19
|
// sent to web client, over Mercury
|
|
20
20
|
UNJOINED: 'unjoined' // sent when you are not joined, but can still see some stuff from the meeting (mutually exclusive with "main")
|
|
21
21
|
};
|
|
22
|
+
|
|
23
|
+
// Priority order for initializing data sets — higher priority names come first.
|
|
24
|
+
// Data sets not listed here will be initialized after all prioritized ones.
|
|
25
|
+
// MAIN must come before SELF because LocusInfo.updateFromHashTree processes the
|
|
26
|
+
// batch of updatedObjects in order, and the SELF handler in updateLocusFromHashTreeObject
|
|
27
|
+
// checks locus.info?.isWebinar (which comes from MAIN) to decide whether to create a
|
|
28
|
+
// participant object for webinar attendees. If SELF were initialized first, locus.info
|
|
29
|
+
// would not yet be populated and the attendee participant would be skipped.
|
|
30
|
+
var DATA_SET_INIT_PRIORITY = exports.DATA_SET_INIT_PRIORITY = [DataSetNames.MAIN, DataSetNames.SELF];
|
|
22
31
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["EMPTY_HASH","exports","DataSetNames","MAIN","ATTENDEES","ATD_ACTIVE","ATD_UNMUTED","SELF","UNJOINED"],"sources":["constants.ts"],"sourcesContent":["export const EMPTY_HASH = '99aa06d3014798d86001c324468d497f';\n\nexport const DataSetNames = {\n MAIN: 'main', // sent to web client, contains also panelists, over LLM\n ATTENDEES: 'attendees', // NOT SENT to web client, all the attendees in the locus\n ATD_ACTIVE: 'atd-active', // only sent to panelists, over LLM; the attendees that have their hands raised or are allowed to unmute themselves\n ATD_UNMUTED: 'atd-unmuted', // sent to web client, over LLM, not sent to panelists; the attendees that are unmuted\n SELF: 'self', // sent to web client, over Mercury\n UNJOINED: 'unjoined', // sent when you are not joined, but can still see some stuff from the meeting (mutually exclusive with \"main\")\n};\n"],"mappings":";;;;;;;AAAO,IAAMA,UAAU,GAAAC,OAAA,CAAAD,UAAA,GAAG,kCAAkC;AAErD,IAAME,YAAY,GAAAD,OAAA,CAAAC,YAAA,GAAG;EAC1BC,IAAI,EAAE,MAAM;EAAE;EACdC,SAAS,EAAE,WAAW;EAAE;EACxBC,UAAU,EAAE,YAAY;EAAE;EAC1BC,WAAW,EAAE,aAAa;EAAE;EAC5BC,IAAI,EAAE,MAAM;EAAE;EACdC,QAAQ,EAAE,UAAU,CAAE;AACxB,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["EMPTY_HASH","exports","DataSetNames","MAIN","ATTENDEES","ATD_ACTIVE","ATD_UNMUTED","SELF","UNJOINED","DATA_SET_INIT_PRIORITY"],"sources":["constants.ts"],"sourcesContent":["export const EMPTY_HASH = '99aa06d3014798d86001c324468d497f';\n\nexport const DataSetNames = {\n MAIN: 'main', // sent to web client, contains also panelists, over LLM\n ATTENDEES: 'attendees', // NOT SENT to web client, all the attendees in the locus\n ATD_ACTIVE: 'atd-active', // only sent to panelists, over LLM; the attendees that have their hands raised or are allowed to unmute themselves\n ATD_UNMUTED: 'atd-unmuted', // sent to web client, over LLM, not sent to panelists; the attendees that are unmuted\n SELF: 'self', // sent to web client, over Mercury\n UNJOINED: 'unjoined', // sent when you are not joined, but can still see some stuff from the meeting (mutually exclusive with \"main\")\n};\n\n// Priority order for initializing data sets — higher priority names come first.\n// Data sets not listed here will be initialized after all prioritized ones.\n// MAIN must come before SELF because LocusInfo.updateFromHashTree processes the\n// batch of updatedObjects in order, and the SELF handler in updateLocusFromHashTreeObject\n// checks locus.info?.isWebinar (which comes from MAIN) to decide whether to create a\n// participant object for webinar attendees. If SELF were initialized first, locus.info\n// would not yet be populated and the attendee participant would be skipped.\nexport const DATA_SET_INIT_PRIORITY: string[] = [DataSetNames.MAIN, DataSetNames.SELF];\n"],"mappings":";;;;;;;AAAO,IAAMA,UAAU,GAAAC,OAAA,CAAAD,UAAA,GAAG,kCAAkC;AAErD,IAAME,YAAY,GAAAD,OAAA,CAAAC,YAAA,GAAG;EAC1BC,IAAI,EAAE,MAAM;EAAE;EACdC,SAAS,EAAE,WAAW;EAAE;EACxBC,UAAU,EAAE,YAAY;EAAE;EAC1BC,WAAW,EAAE,aAAa;EAAE;EAC5BC,IAAI,EAAE,MAAM;EAAE;EACdC,QAAQ,EAAE,UAAU,CAAE;AACxB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACO,IAAMC,sBAAgC,GAAAR,OAAA,CAAAQ,sBAAA,GAAG,CAACP,YAAY,CAACC,IAAI,EAAED,YAAY,CAACK,IAAI,CAAC","ignoreList":[]}
|
|
@@ -39,6 +39,7 @@ var _hashTree = _interopRequireDefault(require("./hashTree"));
|
|
|
39
39
|
var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
|
|
40
40
|
var _constants = require("../constants");
|
|
41
41
|
var _constants2 = require("./constants");
|
|
42
|
+
var _types = require("./types");
|
|
42
43
|
var _utils = require("./utils");
|
|
43
44
|
function ownKeys(e, r) { var t = _Object$keys4(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; }
|
|
44
45
|
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; }
|
|
@@ -247,7 +248,10 @@ var HashTreeParser = /*#__PURE__*/function () {
|
|
|
247
248
|
var dataset = this.dataSets[datasetName];
|
|
248
249
|
if (!dataset) {
|
|
249
250
|
_loggerProxy.default.logger.warn("HashTreeParser#sendInitializationSyncRequestToLocus --> ".concat(this.debugId, " No data set found for ").concat(datasetName, ", cannot send the request for leaf data"));
|
|
250
|
-
return _promise.default.resolve(
|
|
251
|
+
return _promise.default.resolve({
|
|
252
|
+
updateType: LocusInfoUpdateType.OBJECTS_UPDATED,
|
|
253
|
+
updatedObjects: []
|
|
254
|
+
});
|
|
251
255
|
}
|
|
252
256
|
var emptyLeavesData = new Array(dataset.leafCount).fill([]);
|
|
253
257
|
_loggerProxy.default.logger.info("HashTreeParser#sendInitializationSyncRequestToLocus --> ".concat(this.debugId, " Sending initial sync request to Locus for data set \"").concat(datasetName, "\" with empty leaf data"));
|
|
@@ -379,7 +383,7 @@ var HashTreeParser = /*#__PURE__*/function () {
|
|
|
379
383
|
key: "initializeDataSets",
|
|
380
384
|
value: (function () {
|
|
381
385
|
var _initializeDataSets = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3(visibleDataSets, debugText) {
|
|
382
|
-
var updatedObjects, _iterator2, _step2, dataSet, name, leafCount, url,
|
|
386
|
+
var updatedObjects, _iterator2, _step2, dataSet, name, leafCount, url, data, _t;
|
|
383
387
|
return _regenerator.default.wrap(function (_context3) {
|
|
384
388
|
while (1) switch (_context3.prev = _context3.next) {
|
|
385
389
|
case 0:
|
|
@@ -390,7 +394,7 @@ var HashTreeParser = /*#__PURE__*/function () {
|
|
|
390
394
|
return _context3.abrupt("return");
|
|
391
395
|
case 1:
|
|
392
396
|
updatedObjects = [];
|
|
393
|
-
_iterator2 = _createForOfIteratorHelper(visibleDataSets);
|
|
397
|
+
_iterator2 = _createForOfIteratorHelper((0, _utils.sortByInitPriority)(visibleDataSets, _constants2.DATA_SET_INIT_PRIORITY));
|
|
394
398
|
_context3.prev = 2;
|
|
395
399
|
_iterator2.s();
|
|
396
400
|
case 3:
|
|
@@ -430,9 +434,9 @@ var HashTreeParser = /*#__PURE__*/function () {
|
|
|
430
434
|
_context3.next = 5;
|
|
431
435
|
return this.sendInitializationSyncRequestToLocus(name, debugText);
|
|
432
436
|
case 5:
|
|
433
|
-
|
|
434
|
-
if (
|
|
435
|
-
updatedObjects.push.apply(updatedObjects, (0, _toConsumableArray2.default)(
|
|
437
|
+
data = _context3.sent;
|
|
438
|
+
if (data.updateType === LocusInfoUpdateType.OBJECTS_UPDATED) {
|
|
439
|
+
updatedObjects.push.apply(updatedObjects, (0, _toConsumableArray2.default)(data.updatedObjects || []));
|
|
436
440
|
}
|
|
437
441
|
case 6:
|
|
438
442
|
_context3.next = 3;
|
|
@@ -483,7 +487,7 @@ var HashTreeParser = /*#__PURE__*/function () {
|
|
|
483
487
|
copyData = _ref$copyData === void 0 ? false : _ref$copyData;
|
|
484
488
|
// object mapping dataset names to arrays of leaf data
|
|
485
489
|
var leafInfo = {};
|
|
486
|
-
var _findAndStoreMetaData = function findAndStoreMetaData(currentLocusPart) {
|
|
490
|
+
var _findAndStoreMetaData = function findAndStoreMetaData(currentLocusPart, currentLocusPartName) {
|
|
487
491
|
if ((0, _typeof2.default)(currentLocusPart) !== 'object' || currentLocusPart === null) {
|
|
488
492
|
return;
|
|
489
493
|
}
|
|
@@ -499,10 +503,16 @@ var HashTreeParser = /*#__PURE__*/function () {
|
|
|
499
503
|
version: version
|
|
500
504
|
};
|
|
501
505
|
if (copyData) {
|
|
502
|
-
|
|
506
|
+
if (type.toLowerCase() === _types.ObjectType.control) {
|
|
507
|
+
// control entries require special handling, because they are signalled by Locus
|
|
508
|
+
// differently when coming in messages vs API responses
|
|
509
|
+
newLeafInfo.data = (0, _defineProperty2.default)({}, currentLocusPartName, (0, _lodash.cloneDeep)(currentLocusPart));
|
|
510
|
+
} else {
|
|
511
|
+
newLeafInfo.data = (0, _lodash.cloneDeep)(currentLocusPart);
|
|
503
512
|
|
|
504
|
-
|
|
505
|
-
|
|
513
|
+
// remove any nested other objects that have their own htMeta
|
|
514
|
+
(0, _utils.deleteNestedObjectsWithHtMeta)(newLeafInfo.data);
|
|
515
|
+
}
|
|
506
516
|
}
|
|
507
517
|
var _iterator3 = _createForOfIteratorHelper(dataSetNames),
|
|
508
518
|
_step3;
|
|
@@ -521,12 +531,14 @@ var HashTreeParser = /*#__PURE__*/function () {
|
|
|
521
531
|
}
|
|
522
532
|
}
|
|
523
533
|
if ((0, _isArray.default)(currentLocusPart)) {
|
|
524
|
-
var _iterator4 = _createForOfIteratorHelper(currentLocusPart),
|
|
534
|
+
var _iterator4 = _createForOfIteratorHelper(currentLocusPart.entries()),
|
|
525
535
|
_step4;
|
|
526
536
|
try {
|
|
527
537
|
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
528
|
-
var
|
|
529
|
-
|
|
538
|
+
var _step4$value = (0, _slicedToArray2.default)(_step4.value, 2),
|
|
539
|
+
index = _step4$value[0],
|
|
540
|
+
item = _step4$value[1];
|
|
541
|
+
_findAndStoreMetaData(item, index.toString());
|
|
530
542
|
}
|
|
531
543
|
} catch (err) {
|
|
532
544
|
_iterator4.e(err);
|
|
@@ -537,12 +549,12 @@ var HashTreeParser = /*#__PURE__*/function () {
|
|
|
537
549
|
for (var _i = 0, _Object$keys = (0, _keys.default)(currentLocusPart); _i < _Object$keys.length; _i++) {
|
|
538
550
|
var key = _Object$keys[_i];
|
|
539
551
|
if (Object.prototype.hasOwnProperty.call(currentLocusPart, key)) {
|
|
540
|
-
_findAndStoreMetaData(currentLocusPart[key]);
|
|
552
|
+
_findAndStoreMetaData(currentLocusPart[key], key);
|
|
541
553
|
}
|
|
542
554
|
}
|
|
543
555
|
}
|
|
544
556
|
};
|
|
545
|
-
_findAndStoreMetaData(locus);
|
|
557
|
+
_findAndStoreMetaData(locus, 'locus');
|
|
546
558
|
return leafInfo;
|
|
547
559
|
}
|
|
548
560
|
|
|
@@ -995,7 +1007,7 @@ var HashTreeParser = /*#__PURE__*/function () {
|
|
|
995
1007
|
return this.getAllVisibleDataSetsFromLocus();
|
|
996
1008
|
case 2:
|
|
997
1009
|
allDataSets = _context5.sent;
|
|
998
|
-
_iterator7 = _createForOfIteratorHelper(addedDataSets);
|
|
1010
|
+
_iterator7 = _createForOfIteratorHelper((0, _utils.sortByInitPriority)(addedDataSets, _constants2.DATA_SET_INIT_PRIORITY));
|
|
999
1011
|
_context5.prev = 3;
|
|
1000
1012
|
_loop = /*#__PURE__*/_regenerator.default.mark(function _loop() {
|
|
1001
1013
|
var ds, dataSetInfo, updates;
|
|
@@ -1070,8 +1082,7 @@ var HashTreeParser = /*#__PURE__*/function () {
|
|
|
1070
1082
|
key: "parseMessage",
|
|
1071
1083
|
value: function parseMessage(message, debugText) {
|
|
1072
1084
|
var _message$locusStateEl,
|
|
1073
|
-
_this1 = this
|
|
1074
|
-
_message$locusStateEl2;
|
|
1085
|
+
_this1 = this;
|
|
1075
1086
|
if (this.state === 'stopped') {
|
|
1076
1087
|
return [];
|
|
1077
1088
|
}
|
|
@@ -1130,7 +1141,7 @@ var HashTreeParser = /*#__PURE__*/function () {
|
|
|
1130
1141
|
dataSetsRequiringInitialization = this.processVisibleDataSetChanges(removedDataSets, addedDataSets, updatedObjects);
|
|
1131
1142
|
}
|
|
1132
1143
|
}
|
|
1133
|
-
if (
|
|
1144
|
+
if (message.locusStateElements && message.locusStateElements.length > 0) {
|
|
1134
1145
|
// by this point we now have this.dataSets setup for data sets from this message
|
|
1135
1146
|
// and hash trees created for the new visible data sets,
|
|
1136
1147
|
// so we can now process all the updates from the message
|
|
@@ -1220,16 +1231,16 @@ var HashTreeParser = /*#__PURE__*/function () {
|
|
|
1220
1231
|
}, {
|
|
1221
1232
|
key: "callLocusInfoUpdateCallback",
|
|
1222
1233
|
value: function callLocusInfoUpdateCallback(updates) {
|
|
1223
|
-
var
|
|
1234
|
+
var _updates$updatedObjec,
|
|
1235
|
+
_this10 = this;
|
|
1224
1236
|
if (this.state === 'stopped') {
|
|
1225
1237
|
return;
|
|
1226
1238
|
}
|
|
1227
|
-
var updateType = updates.updateType
|
|
1228
|
-
|
|
1229
|
-
if (updateType === LocusInfoUpdateType.OBJECTS_UPDATED && (updatedObjects === null || updatedObjects === void 0 ? void 0 : updatedObjects.length) > 0) {
|
|
1239
|
+
var updateType = updates.updateType;
|
|
1240
|
+
if (updateType === LocusInfoUpdateType.OBJECTS_UPDATED && ((_updates$updatedObjec = updates.updatedObjects) === null || _updates$updatedObjec === void 0 ? void 0 : _updates$updatedObjec.length) > 0) {
|
|
1230
1241
|
// Filter out updates for objects that already have a higher version in their datasets,
|
|
1231
1242
|
// or removals for objects that still exist in any of their datasets
|
|
1232
|
-
var filteredUpdates = updatedObjects.filter(function (object) {
|
|
1243
|
+
var filteredUpdates = updates.updatedObjects.filter(function (object) {
|
|
1233
1244
|
var elementId = object.htMeta.elementId;
|
|
1234
1245
|
var type = elementId.type,
|
|
1235
1246
|
id = elementId.id,
|
|
@@ -1261,13 +1272,14 @@ var HashTreeParser = /*#__PURE__*/function () {
|
|
|
1261
1272
|
return true;
|
|
1262
1273
|
});
|
|
1263
1274
|
if (filteredUpdates.length > 0) {
|
|
1264
|
-
this.locusInfoUpdateCallback(
|
|
1275
|
+
this.locusInfoUpdateCallback({
|
|
1276
|
+
updateType: updateType,
|
|
1265
1277
|
updatedObjects: filteredUpdates
|
|
1266
1278
|
});
|
|
1267
1279
|
}
|
|
1268
1280
|
} else if (updateType !== LocusInfoUpdateType.OBJECTS_UPDATED) {
|
|
1269
|
-
this.locusInfoUpdateCallback(
|
|
1270
|
-
|
|
1281
|
+
this.locusInfoUpdateCallback({
|
|
1282
|
+
updateType: updateType
|
|
1271
1283
|
});
|
|
1272
1284
|
}
|
|
1273
1285
|
}
|
|
@@ -1548,6 +1560,18 @@ var HashTreeParser = /*#__PURE__*/function () {
|
|
|
1548
1560
|
this.state = 'stopped';
|
|
1549
1561
|
}
|
|
1550
1562
|
|
|
1563
|
+
/**
|
|
1564
|
+
* Cleans up the HashTreeParser, stopping all timers and clearing all internal state.
|
|
1565
|
+
* After calling this, the parser should not be used anymore.
|
|
1566
|
+
* @returns {void}
|
|
1567
|
+
*/
|
|
1568
|
+
}, {
|
|
1569
|
+
key: "cleanUp",
|
|
1570
|
+
value: function cleanUp() {
|
|
1571
|
+
this.stop();
|
|
1572
|
+
this.dataSets = {};
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1551
1575
|
/**
|
|
1552
1576
|
* Resumes the HashTreeParser that was previously stopped.
|
|
1553
1577
|
* @param {HashTreeMessage} message - The message to resume with, it must contain metadata with visible data sets info
|
|
@@ -1556,9 +1580,9 @@ var HashTreeParser = /*#__PURE__*/function () {
|
|
|
1556
1580
|
}, {
|
|
1557
1581
|
key: "resume",
|
|
1558
1582
|
value: function resume(message) {
|
|
1559
|
-
var _message$
|
|
1583
|
+
var _message$locusStateEl2, _metadataObject$data;
|
|
1560
1584
|
// check that message contains metadata with visible data sets - this is essential to be able to resume
|
|
1561
|
-
var metadataObject = (_message$
|
|
1585
|
+
var metadataObject = (_message$locusStateEl2 = message.locusStateElements) === null || _message$locusStateEl2 === void 0 ? void 0 : _message$locusStateEl2.find(function (el) {
|
|
1562
1586
|
return (0, _utils.isMetadata)(el);
|
|
1563
1587
|
});
|
|
1564
1588
|
if (!(metadataObject !== null && metadataObject !== void 0 && (_metadataObject$data = metadataObject.data) !== null && _metadataObject$data !== void 0 && _metadataObject$data.visibleDataSets)) {
|
|
@@ -1658,9 +1682,10 @@ var HashTreeParser = /*#__PURE__*/function () {
|
|
|
1658
1682
|
leafDataEntries: []
|
|
1659
1683
|
};
|
|
1660
1684
|
(0, _keys.default)(mismatchedLeavesData).forEach(function (index) {
|
|
1685
|
+
var leafIndex = (0, _parseInt2.default)(index, 10);
|
|
1661
1686
|
body.leafDataEntries.push({
|
|
1662
|
-
leafIndex:
|
|
1663
|
-
elementIds: mismatchedLeavesData[
|
|
1687
|
+
leafIndex: leafIndex,
|
|
1688
|
+
elementIds: mismatchedLeavesData[leafIndex]
|
|
1664
1689
|
});
|
|
1665
1690
|
});
|
|
1666
1691
|
var ourCurrentRootHash = dataSet.hashTree ? dataSet.hashTree.getRootHash() : _constants2.EMPTY_HASH;
|