@webex/plugin-meetings 3.12.0-next.8 → 3.12.0-task-refactor.1

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.
Files changed (201) hide show
  1. package/dist/annotation/index.js +5 -14
  2. package/dist/annotation/index.js.map +1 -1
  3. package/dist/breakouts/breakout.js +1 -1
  4. package/dist/breakouts/index.js +1 -1
  5. package/dist/config.js +2 -8
  6. package/dist/config.js.map +1 -1
  7. package/dist/constants.js +6 -29
  8. package/dist/constants.js.map +1 -1
  9. package/dist/hashTree/hashTreeParser.js +29 -1563
  10. package/dist/hashTree/hashTreeParser.js.map +1 -1
  11. package/dist/hashTree/types.js +3 -13
  12. package/dist/hashTree/types.js.map +1 -1
  13. package/dist/index.js +2 -11
  14. package/dist/index.js.map +1 -1
  15. package/dist/interceptors/index.js +0 -7
  16. package/dist/interceptors/index.js.map +1 -1
  17. package/dist/interceptors/locusRouteToken.js +5 -27
  18. package/dist/interceptors/locusRouteToken.js.map +1 -1
  19. package/dist/interpretation/index.js +2 -2
  20. package/dist/interpretation/index.js.map +1 -1
  21. package/dist/interpretation/siLanguage.js +1 -1
  22. package/dist/locus-info/controlsUtils.js +3 -7
  23. package/dist/locus-info/controlsUtils.js.map +1 -1
  24. package/dist/locus-info/index.js +247 -642
  25. package/dist/locus-info/index.js.map +1 -1
  26. package/dist/locus-info/selfUtils.js +0 -1
  27. package/dist/locus-info/selfUtils.js.map +1 -1
  28. package/dist/locus-info/types.js.map +1 -1
  29. package/dist/media/MediaConnectionAwaiter.js +1 -57
  30. package/dist/media/MediaConnectionAwaiter.js.map +1 -1
  31. package/dist/media/properties.js +2 -4
  32. package/dist/media/properties.js.map +1 -1
  33. package/dist/meeting/in-meeting-actions.js +1 -7
  34. package/dist/meeting/in-meeting-actions.js.map +1 -1
  35. package/dist/meeting/index.js +1036 -1481
  36. package/dist/meeting/index.js.map +1 -1
  37. package/dist/meeting/request.js +0 -50
  38. package/dist/meeting/request.js.map +1 -1
  39. package/dist/meeting/request.type.js.map +1 -1
  40. package/dist/meeting/util.js +3 -133
  41. package/dist/meeting/util.js.map +1 -1
  42. package/dist/meetings/index.js +59 -142
  43. package/dist/meetings/index.js.map +1 -1
  44. package/dist/meetings/util.js +7 -11
  45. package/dist/meetings/util.js.map +1 -1
  46. package/dist/member/index.js +0 -10
  47. package/dist/member/index.js.map +1 -1
  48. package/dist/member/util.js +0 -10
  49. package/dist/member/util.js.map +1 -1
  50. package/dist/metrics/constants.js +1 -7
  51. package/dist/metrics/constants.js.map +1 -1
  52. package/dist/multistream/mediaRequestManager.js +60 -9
  53. package/dist/multistream/mediaRequestManager.js.map +1 -1
  54. package/dist/multistream/remoteMediaManager.js +0 -11
  55. package/dist/multistream/remoteMediaManager.js.map +1 -1
  56. package/dist/multistream/sendSlotManager.js +2 -116
  57. package/dist/multistream/sendSlotManager.js.map +1 -1
  58. package/dist/reachability/clusterReachability.js +18 -171
  59. package/dist/reachability/clusterReachability.js.map +1 -1
  60. package/dist/reachability/index.js +11 -21
  61. package/dist/reachability/index.js.map +1 -1
  62. package/dist/reachability/reachabilityPeerConnection.js +1 -1
  63. package/dist/reachability/reachabilityPeerConnection.js.map +1 -1
  64. package/dist/reactions/reactions.type.js.map +1 -1
  65. package/dist/reconnection-manager/index.js +1 -0
  66. package/dist/reconnection-manager/index.js.map +1 -1
  67. package/dist/types/common/browser-detection.d.ts +0 -1
  68. package/dist/types/common/events/events-scope.d.ts +0 -1
  69. package/dist/types/common/events/events.d.ts +0 -1
  70. package/dist/types/config.d.ts +0 -5
  71. package/dist/types/constants.d.ts +1 -24
  72. package/dist/types/hashTree/hashTreeParser.d.ts +11 -260
  73. package/dist/types/hashTree/types.d.ts +0 -20
  74. package/dist/types/index.d.ts +0 -1
  75. package/dist/types/interceptors/index.d.ts +1 -2
  76. package/dist/types/interceptors/locusRouteToken.d.ts +0 -2
  77. package/dist/types/locus-info/index.d.ts +47 -68
  78. package/dist/types/locus-info/types.d.ts +12 -28
  79. package/dist/types/media/MediaConnectionAwaiter.d.ts +1 -10
  80. package/dist/types/media/properties.d.ts +1 -2
  81. package/dist/types/meeting/in-meeting-actions.d.ts +0 -6
  82. package/dist/types/meeting/index.d.ts +7 -86
  83. package/dist/types/meeting/request.d.ts +1 -16
  84. package/dist/types/meeting/request.type.d.ts +0 -5
  85. package/dist/types/meeting/util.d.ts +0 -31
  86. package/dist/types/meeting-info/util.d.ts +0 -1
  87. package/dist/types/meeting-info/utilv2.d.ts +0 -1
  88. package/dist/types/meetings/index.d.ts +2 -4
  89. package/dist/types/member/index.d.ts +0 -1
  90. package/dist/types/member/types.d.ts +4 -4
  91. package/dist/types/member/util.d.ts +0 -5
  92. package/dist/types/metrics/constants.d.ts +0 -6
  93. package/dist/types/multistream/mediaRequestManager.d.ts +23 -0
  94. package/dist/types/multistream/sendSlotManager.d.ts +1 -23
  95. package/dist/types/reachability/clusterReachability.d.ts +3 -30
  96. package/dist/types/reactions/reactions.type.d.ts +0 -1
  97. package/dist/types/recording-controller/util.d.ts +5 -5
  98. package/dist/types/roap/index.d.ts +1 -1
  99. package/dist/webinar/index.js +163 -438
  100. package/dist/webinar/index.js.map +1 -1
  101. package/package.json +24 -26
  102. package/src/annotation/index.ts +7 -27
  103. package/src/config.ts +0 -5
  104. package/src/constants.ts +1 -30
  105. package/src/hashTree/hashTreeParser.ts +25 -1523
  106. package/src/hashTree/types.ts +1 -24
  107. package/src/index.ts +1 -8
  108. package/src/interceptors/index.ts +1 -2
  109. package/src/interceptors/locusRouteToken.ts +5 -22
  110. package/src/interpretation/index.ts +2 -2
  111. package/src/locus-info/controlsUtils.ts +0 -17
  112. package/src/locus-info/index.ts +213 -707
  113. package/src/locus-info/selfUtils.ts +0 -1
  114. package/src/locus-info/types.ts +12 -27
  115. package/src/media/MediaConnectionAwaiter.ts +1 -41
  116. package/src/media/properties.ts +1 -3
  117. package/src/meeting/in-meeting-actions.ts +0 -12
  118. package/src/meeting/index.ts +84 -461
  119. package/src/meeting/request.ts +0 -42
  120. package/src/meeting/request.type.ts +0 -6
  121. package/src/meeting/util.ts +2 -160
  122. package/src/meetings/index.ts +60 -180
  123. package/src/meetings/util.ts +9 -10
  124. package/src/member/index.ts +0 -10
  125. package/src/member/util.ts +0 -12
  126. package/src/metrics/constants.ts +0 -7
  127. package/src/multistream/mediaRequestManager.ts +54 -4
  128. package/src/multistream/remoteMediaManager.ts +0 -13
  129. package/src/multistream/sendSlotManager.ts +3 -97
  130. package/src/reachability/clusterReachability.ts +27 -153
  131. package/src/reachability/index.ts +1 -15
  132. package/src/reachability/reachabilityPeerConnection.ts +1 -3
  133. package/src/reactions/reactions.type.ts +0 -1
  134. package/src/reconnection-manager/index.ts +1 -0
  135. package/src/webinar/index.ts +6 -265
  136. package/test/unit/spec/annotation/index.ts +7 -69
  137. package/test/unit/spec/interceptors/locusRouteToken.ts +0 -44
  138. package/test/unit/spec/locus-info/controlsUtils.js +1 -56
  139. package/test/unit/spec/locus-info/index.js +90 -1457
  140. package/test/unit/spec/media/MediaConnectionAwaiter.ts +1 -41
  141. package/test/unit/spec/media/properties.ts +3 -12
  142. package/test/unit/spec/meeting/in-meeting-actions.ts +2 -8
  143. package/test/unit/spec/meeting/index.js +128 -981
  144. package/test/unit/spec/meeting/request.js +0 -70
  145. package/test/unit/spec/meeting/utils.js +26 -438
  146. package/test/unit/spec/meetings/index.js +33 -845
  147. package/test/unit/spec/meetings/utils.js +1 -51
  148. package/test/unit/spec/member/index.js +4 -28
  149. package/test/unit/spec/member/util.js +27 -65
  150. package/test/unit/spec/multistream/mediaRequestManager.ts +85 -2
  151. package/test/unit/spec/multistream/remoteMediaManager.ts +0 -30
  152. package/test/unit/spec/multistream/sendSlotManager.ts +36 -135
  153. package/test/unit/spec/reachability/clusterReachability.ts +1 -125
  154. package/test/unit/spec/reachability/index.ts +3 -26
  155. package/test/unit/spec/reconnection-manager/index.js +8 -4
  156. package/test/unit/spec/webinar/index.ts +37 -534
  157. package/dist/aiEnableRequest/index.js +0 -184
  158. package/dist/aiEnableRequest/index.js.map +0 -1
  159. package/dist/aiEnableRequest/utils.js +0 -36
  160. package/dist/aiEnableRequest/utils.js.map +0 -1
  161. package/dist/hashTree/constants.js +0 -22
  162. package/dist/hashTree/constants.js.map +0 -1
  163. package/dist/hashTree/hashTree.js +0 -533
  164. package/dist/hashTree/hashTree.js.map +0 -1
  165. package/dist/hashTree/utils.js +0 -69
  166. package/dist/hashTree/utils.js.map +0 -1
  167. package/dist/interceptors/constant.js +0 -12
  168. package/dist/interceptors/constant.js.map +0 -1
  169. package/dist/interceptors/dataChannelAuthToken.js +0 -290
  170. package/dist/interceptors/dataChannelAuthToken.js.map +0 -1
  171. package/dist/interceptors/utils.js +0 -27
  172. package/dist/interceptors/utils.js.map +0 -1
  173. package/dist/types/aiEnableRequest/index.d.ts +0 -5
  174. package/dist/types/aiEnableRequest/utils.d.ts +0 -2
  175. package/dist/types/hashTree/constants.d.ts +0 -9
  176. package/dist/types/hashTree/hashTree.d.ts +0 -136
  177. package/dist/types/hashTree/utils.d.ts +0 -22
  178. package/dist/types/interceptors/constant.d.ts +0 -5
  179. package/dist/types/interceptors/dataChannelAuthToken.d.ts +0 -43
  180. package/dist/types/interceptors/utils.d.ts +0 -1
  181. package/dist/types/webinar/utils.d.ts +0 -6
  182. package/dist/webinar/utils.js +0 -25
  183. package/dist/webinar/utils.js.map +0 -1
  184. package/src/aiEnableRequest/README.md +0 -84
  185. package/src/aiEnableRequest/index.ts +0 -170
  186. package/src/aiEnableRequest/utils.ts +0 -25
  187. package/src/hashTree/constants.ts +0 -10
  188. package/src/hashTree/hashTree.ts +0 -480
  189. package/src/hashTree/utils.ts +0 -62
  190. package/src/interceptors/constant.ts +0 -6
  191. package/src/interceptors/dataChannelAuthToken.ts +0 -170
  192. package/src/interceptors/utils.ts +0 -16
  193. package/src/webinar/utils.ts +0 -16
  194. package/test/unit/spec/aiEnableRequest/index.ts +0 -981
  195. package/test/unit/spec/aiEnableRequest/utils.ts +0 -130
  196. package/test/unit/spec/hashTree/hashTree.ts +0 -721
  197. package/test/unit/spec/hashTree/hashTreeParser.ts +0 -3670
  198. package/test/unit/spec/hashTree/utils.ts +0 -140
  199. package/test/unit/spec/interceptors/dataChannelAuthToken.ts +0 -210
  200. package/test/unit/spec/interceptors/utils.ts +0 -75
  201. package/test/unit/spec/webinar/utils.ts +0 -39
@@ -48,7 +48,7 @@ var _constants = require("../constants");
48
48
  var _constants2 = _interopRequireDefault(require("../metrics/constants"));
49
49
  var _meetingInfo = _interopRequireDefault(require("../meeting-info"));
50
50
  var _meetingInfoV = _interopRequireDefault(require("../meeting-info/meeting-info-v2"));
51
- var _meeting = _interopRequireWildcard(require("../meeting"));
51
+ var _meeting = _interopRequireDefault(require("../meeting"));
52
52
  var _personalMeetingRoom = _interopRequireDefault(require("../personal-meeting-room"));
53
53
  var _reachability = _interopRequireDefault(require("../reachability"));
54
54
  var _request2 = _interopRequireDefault(require("./request"));
@@ -62,8 +62,6 @@ var _joinWebinarError = _interopRequireDefault(require("../common/errors/join-we
62
62
  var _webexErrors = require("../common/errors/webex-errors");
63
63
  var _noMeetingInfo = _interopRequireDefault(require("../common/errors/no-meeting-info"));
64
64
  var _joinForbiddenError = _interopRequireDefault(require("../common/errors/join-forbidden-error"));
65
- var _utils = require("../hashTree/utils");
66
- var _locusInfo = require("../locus-info");
67
65
  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 _t3 in e) "default" !== _t3 && {}.hasOwnProperty.call(e, _t3) && ((i = (o = _Object$defineProperty) && _Object$getOwnPropertyDescriptor(e, _t3)) && (i.get || i.set) ? o(f, _t3, i) : f[_t3] = e[_t3]); return f; })(e, t); }
68
66
  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
67
  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; }
@@ -195,8 +193,6 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
195
193
  (0, _defineProperty2.default)(_this, "preferredWebexSite", void 0);
196
194
  (0, _defineProperty2.default)(_this, "reachability", void 0);
197
195
  (0, _defineProperty2.default)(_this, "registered", void 0);
198
- (0, _defineProperty2.default)(_this, "registrationPromise", void 0);
199
- (0, _defineProperty2.default)(_this, "unregistrationPromise", void 0);
200
196
  (0, _defineProperty2.default)(_this, "request", void 0);
201
197
  (0, _defineProperty2.default)(_this, "geoHintInfo", void 0);
202
198
  (0, _defineProperty2.default)(_this, "meetingInfo", void 0);
@@ -439,41 +435,19 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
439
435
  }, {
440
436
  key: "getCorrespondingMeetingByLocus",
441
437
  value: function getCorrespondingMeetingByLocus(data) {
442
- var _data$stateElementsMe, _data$stateElementsMe2, _data$stateElementsMe3, _data$stateElementsMe4, _data$locus, _self$callbackInfo, _data$locus2, _data$locus2$info, _data$locus3, _data$locus4, _data$locus4$info;
443
- var locusUrl = ((_data$stateElementsMe = data.stateElementsMessage) === null || _data$stateElementsMe === void 0 ? void 0 : _data$stateElementsMe.locusUrl) ||
444
- // hash tree event
445
- data.locusUrl; // classic event
446
-
447
- // first try to find by locusUrl - that's the simplest and quickest way
448
- var existingMeeting = this.meetingCollection.getByKey(_meetings.MEETING_KEY.LOCUS_URL, locusUrl);
449
- if (existingMeeting) {
450
- return existingMeeting;
451
- }
452
- if (data.eventType === _constants.LOCUSEVENT.HASH_TREE_DATA_UPDATED) {
453
- // need to check if maybe this event indicates a move to/from breakout
454
- var meetingForHashTreeMessage = (0, _locusInfo.findMeetingForHashTreeMessage)(data.stateElementsMessage, this.meetingCollection,
455
- // @ts-ignore
456
- this.webex.internal.device.url);
457
- if (meetingForHashTreeMessage) {
458
- return meetingForHashTreeMessage;
459
- }
438
+ var _data$stateElementsMe, _data$locus, _data$locus$self, _data$locus$self$call, _data$locus2, _data$locus2$info, _data$locus3, _data$locus4, _data$locus4$info;
439
+ if (data.eventType === _constants.LOCUSEVENT.HASH_TREE_DATA_UPDATED && (_data$stateElementsMe = data.stateElementsMessage) !== null && _data$stateElementsMe !== void 0 && _data$stateElementsMe.locusUrl) {
440
+ return this.meetingCollection.getByKey(_meetings.MEETING_KEY.LOCUS_URL, data.stateElementsMessage.locusUrl);
460
441
  }
461
442
 
462
- // if that didn't work, fallback to other fields like correlationId, sipUri, etc
463
-
464
- // If the event is a hash tree event, we need to extract "self" object from it
465
- // We don't care about the version, just need to find the meeting this event is for,
466
- // so any hash tree object of type "self" will do
467
- var hashTreeEventSelf = (_data$stateElementsMe2 = data.stateElementsMessage) === null || _data$stateElementsMe2 === void 0 ? void 0 : (_data$stateElementsMe3 = _data$stateElementsMe2.locusStateElements) === null || _data$stateElementsMe3 === void 0 ? void 0 : (_data$stateElementsMe4 = _data$stateElementsMe3.find(function (obj) {
468
- return (0, _utils.isSelf)(obj);
469
- })) === null || _data$stateElementsMe4 === void 0 ? void 0 : _data$stateElementsMe4.data;
470
- var self = hashTreeEventSelf || ((_data$locus = data.locus) === null || _data$locus === void 0 ? void 0 : _data$locus.self);
471
- return (
472
- // @ts-ignore
473
- this.meetingCollection.getByKey(_meetings.MEETING_KEY.CORRELATION_ID,
474
- // @ts-ignore
475
- _util2.default.getCorrelationIdForDevice(this.webex.internal.device.url, self)) || this.meetingCollection.getByKey(_meetings.MEETING_KEY.SIP_URI, self === null || self === void 0 ? void 0 : (_self$callbackInfo = self.callbackInfo) === null || _self$callbackInfo === void 0 ? void 0 : _self$callbackInfo.callbackAddress) || ((_data$locus2 = data.locus) !== null && _data$locus2 !== void 0 && (_data$locus2$info = _data$locus2.info) !== null && _data$locus2$info !== void 0 && _data$locus2$info.isUnifiedSpaceMeeting ? undefined : this.meetingCollection.getByKey(_meetings.MEETING_KEY.CONVERSATION_URL, (_data$locus3 = data.locus) === null || _data$locus3 === void 0 ? void 0 : _data$locus3.conversationUrl)) || this.meetingCollection.getByKey(_meetings.MEETING_KEY.MEETINGNUMBER, (_data$locus4 = data.locus) === null || _data$locus4 === void 0 ? void 0 : (_data$locus4$info = _data$locus4.info) === null || _data$locus4$info === void 0 ? void 0 : _data$locus4$info.webExMeetingId)
476
- );
443
+ // getting meeting by correlationId. This will happen for the new event
444
+ // Either the locus
445
+ // TODO : Add check for the callBack Address
446
+ return this.meetingCollection.getByKey(_meetings.MEETING_KEY.LOCUS_URL, data.locusUrl) ||
447
+ // @ts-ignore
448
+ this.meetingCollection.getByKey(_meetings.MEETING_KEY.CORRELATION_ID,
449
+ // @ts-ignore
450
+ _util2.default.checkForCorrelationId(this.webex.internal.device.url, data.locus)) || this.meetingCollection.getByKey(_meetings.MEETING_KEY.SIP_URI, (_data$locus = data.locus) === null || _data$locus === void 0 ? void 0 : (_data$locus$self = _data$locus.self) === null || _data$locus$self === void 0 ? void 0 : (_data$locus$self$call = _data$locus$self.callbackInfo) === null || _data$locus$self$call === void 0 ? void 0 : _data$locus$self$call.callbackAddress) || ((_data$locus2 = data.locus) !== null && _data$locus2 !== void 0 && (_data$locus2$info = _data$locus2.info) !== null && _data$locus2$info !== void 0 && _data$locus2$info.isUnifiedSpaceMeeting ? undefined : this.meetingCollection.getByKey(_meetings.MEETING_KEY.CONVERSATION_URL, (_data$locus3 = data.locus) === null || _data$locus3 === void 0 ? void 0 : _data$locus3.conversationUrl)) || this.meetingCollection.getByKey(_meetings.MEETING_KEY.MEETINGNUMBER, (_data$locus4 = data.locus) === null || _data$locus4 === void 0 ? void 0 : (_data$locus4$info = _data$locus4.info) === null || _data$locus4$info === void 0 ? void 0 : _data$locus4$info.webExMeetingId);
477
451
  }
478
452
 
479
453
  /**
@@ -494,11 +468,6 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
494
468
  var useRandomDelayForInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
495
469
  var meeting = this.getCorrespondingMeetingByLocus(data);
496
470
 
497
- // @ts-ignore
498
- if (this.config.experimental.storeLocusHashTreeEventsForDebugging) {
499
- (0, _meeting.storeEventForDebugging)('mercury', data);
500
- }
501
-
502
471
  // Special case when locus has got replaced, This only happend once if a replace locus exists
503
472
  // https://sqbu-github.cisco.com/WebExSquared/locus/wiki/Locus-changing-mid-call
504
473
 
@@ -509,7 +478,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
509
478
  meeting = this.meetingCollection.getByKey(_meetings.MEETING_KEY.LOCUS_URL, data.locus.replaces[data.locus.replaces.length - 1].locusUrl);
510
479
  }
511
480
  if (meeting && !_util2.default.isBreakoutLocusDTO(data.locus)) {
512
- meeting.locusInfo.updateMainSessionLocusCache(data.locus); // here data.locus will never be a complete locus
481
+ meeting.locusInfo.updateMainSessionLocusCache(data.locus);
513
482
  }
514
483
  if (!this.isNeedHandleLocusDTO(meeting, data.locus)) {
515
484
  _loggerProxy.default.logger.log("Meetings:index#handleLocusEvent --> doesn't need to process locus event");
@@ -536,29 +505,25 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
536
505
  // };
537
506
  // rather then locus object change to locus url
538
507
 
539
- if (data.eventType === _constants.LOCUSEVENT.HASH_TREE_DATA_UPDATED) {
540
- // We're about to create a new meeting object from this hash tree message.
541
- // There is some existing (pre-hash trees) SDK logic here that requires a locus object
542
- // (at the very minimum we need locus.url to be set)
543
- // so we try to create locus from the received hash tree message
544
- // it will not be complete, in most cases it will only have the self part, but that's still better than nothing
545
- var _createLocusFromHashT = (0, _locusInfo.createLocusFromHashTreeMessage)(data.stateElementsMessage),
546
- locus = _createLocusFromHashT.locus;
547
- data.locus = locus;
548
- }
549
- if (data.locus && data.locus.fullState && data.locus.fullState.state === _constants.LOCUS.STATE.INACTIVE) {
550
- // just ignore the event as its already ended and not active
551
- _loggerProxy.default.logger.warn('Meetings:index#handleLocusEvent --> Locus event received for meeting, after it was ended.');
552
- return;
553
- }
508
+ if (data.eventType !== _constants.LOCUSEVENT.HASH_TREE_DATA_UPDATED) {
509
+ if (data.locus && data.locus.fullState && data.locus.fullState.state === _constants.LOCUS.STATE.INACTIVE) {
510
+ // just ignore the event as its already ended and not active
511
+ _loggerProxy.default.logger.warn('Meetings:index#handleLocusEvent --> Locus event received for meeting, after it was ended.');
512
+ return;
513
+ }
554
514
 
555
- // When its wireless share or guest and user leaves the meeting we dont have to keep the meeting object
556
- // Any future events will be neglected
515
+ // When its wireless share or guest and user leaves the meeting we dont have to keep the meeting object
516
+ // Any future events will be neglected
557
517
 
558
- if (data.locus && data.locus.self && data.locus.self.state === _constants._LEFT_ && data.locus.self.removed === true) {
559
- // just ignore the event as its already ended and not active
560
- _loggerProxy.default.logger.warn('Meetings:index#handleLocusEvent --> Locus event received for meeting, after it was ended.');
561
- return;
518
+ if (data.locus && data.locus.self && data.locus.self.state === _constants._LEFT_ && data.locus.self.removed === true) {
519
+ // just ignore the event as its already ended and not active
520
+ _loggerProxy.default.logger.warn('Meetings:index#handleLocusEvent --> Locus event received for meeting, after it was ended.');
521
+ return;
522
+ }
523
+ }
524
+ if (data.eventType === _constants.LOCUSEVENT.HASH_TREE_DATA_UPDATED) {
525
+ // in hash tree messages we don't ge the locus object, but the meeting constructor needs at least locus.url
526
+ (0, _lodash.set)(data, 'locus.url', data.stateElementsMessage.locusUrl);
562
527
  }
563
528
  this.create(data.locus, _constants.DESTINATION_TYPE.LOCUS_ID, useRandomDelayForInfo).then(/*#__PURE__*/function () {
564
529
  var _ref3 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3(newMeeting) {
@@ -629,7 +594,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
629
594
  }
630
595
 
631
596
  /**
632
- * handles locus events through mercury that are not roap or approval request events
597
+ * handles locus events through mercury that are not roap
633
598
  * @param {Object} envelope
634
599
  * @param {Object} envelope.data
635
600
  * @param {String} envelope.data.eventType
@@ -643,7 +608,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
643
608
  var data = envelope.data;
644
609
  // eslint-disable-next-line @typescript-eslint/no-shadow
645
610
  var eventType = data.eventType;
646
- if (eventType && eventType !== _constants.LOCUSEVENT.MESSAGE_ROAP && eventType !== _constants.LOCUSEVENT.APPROVAL_REQUEST) {
611
+ if (eventType && eventType !== _constants.LOCUSEVENT.MESSAGE_ROAP) {
647
612
  this.handleLocusEvent(data, true);
648
613
  }
649
614
  }
@@ -964,11 +929,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
964
929
  value: function executeRegistrationStep(step, stepName) {
965
930
  var _this5 = this;
966
931
  return step().then(function () {
967
- _loggerProxy.default.logger.info("Meetings:index#executeRegistrationStep --> INFO, ".concat(stepName, " completed"));
968
932
  _this5.registrationStatus[stepName] = true;
969
- }).catch(function (error) {
970
- _loggerProxy.default.logger.error("Meetings:index#executeRegistrationStep --> ERROR, ".concat(stepName, " failed: ").concat(error.message));
971
- return _promise.default.reject(error);
972
933
  });
973
934
  }
974
935
 
@@ -985,20 +946,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
985
946
  key: "register",
986
947
  value: function register(deviceRegistrationOptions) {
987
948
  var _this6 = this;
988
- if (this.unregistrationPromise) {
989
- _loggerProxy.default.logger.info('Meetings:index#register --> INFO, Meetings plugin unregistration in progress, waiting to register');
990
- this.registrationPromise = this.unregistrationPromise.catch(function () {}) // It doesn't matter what happened during unregistration
991
- .finally(function () {
992
- _loggerProxy.default.logger.info('Meetings:index#register --> INFO, Meetings plugin unregistration completed, proceeding to register');
993
- _this6.registrationPromise = null;
994
- return _this6.register(deviceRegistrationOptions);
995
- });
996
- return this.registrationPromise;
997
- }
998
- if (this.registrationPromise) {
999
- _loggerProxy.default.logger.info('Meetings:index#register --> INFO, Meetings plugin registration in progress, returning existing promise');
1000
- return this.registrationPromise;
1001
- }
949
+ this.registrationStatus = (0, _lodash.clone)(_constants.INITIAL_REGISTRATION_STATUS);
1002
950
 
1003
951
  // @ts-ignore
1004
952
  if (!this.webex.canAuthorize) {
@@ -1009,9 +957,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1009
957
  _loggerProxy.default.logger.info('Meetings:index#register --> INFO, Meetings plugin already registered');
1010
958
  return _promise.default.resolve();
1011
959
  }
1012
- _loggerProxy.default.logger.info('Meetings:index#register --> INFO, Registering Meetings plugin');
1013
- this.registrationStatus = (0, _lodash.clone)(_constants.INITIAL_REGISTRATION_STATUS);
1014
- this.registrationPromise = _promise.default.all([this.executeRegistrationStep(function () {
960
+ return _promise.default.all([this.executeRegistrationStep(function () {
1015
961
  return _this6.fetchUserPreferredWebexSite();
1016
962
  }, 'fetchWebexSite'), this.executeRegistrationStep(function () {
1017
963
  return _this6.getGeoHint();
@@ -1052,10 +998,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1052
998
  stack: error.stack
1053
999
  });
1054
1000
  return _promise.default.reject(error);
1055
- }).finally(function () {
1056
- _this6.registrationPromise = null;
1057
1001
  });
1058
- return this.registrationPromise;
1059
1002
  }
1060
1003
 
1061
1004
  /**
@@ -1070,61 +1013,35 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1070
1013
  key: "unregister",
1071
1014
  value: function unregister() {
1072
1015
  var _this7 = this;
1073
- if (this.unregistrationPromise) {
1074
- _loggerProxy.default.logger.info('Meetings:index#unregister --> INFO, Meetings plugin unregistration in progress, returning existing promise');
1075
- return this.unregistrationPromise;
1076
- }
1077
- if (this.registrationPromise) {
1078
- _loggerProxy.default.logger.info('Meetings:index#unregister --> INFO, Meetings plugin registration in progress, waiting to unregister');
1079
-
1080
- // Wait for registration to complete (success or failure), then call unregister again
1081
- this.unregistrationPromise = this.registrationPromise.catch(function () {}) // It doesn't matter what happened during registration
1082
- .finally(function () {
1083
- _loggerProxy.default.logger.info('Meetings:index#unregister --> INFO, Meetings plugin registration completed, proceeding to unregister');
1084
- _this7.unregistrationPromise = null;
1085
- return _this7.unregister();
1086
- });
1087
- return this.unregistrationPromise;
1088
- }
1089
1016
  if (!this.registered) {
1090
1017
  _loggerProxy.default.logger.info('Meetings:index#unregister --> INFO, Meetings plugin already unregistered');
1091
1018
  return _promise.default.resolve();
1092
1019
  }
1093
1020
  this.stopListeningForEvents();
1094
- this.unregistrationPromise =
1095
- // @ts-ignore
1096
- this.webex.internal.mercury
1097
- // Use code 3050 with a non-reconnecting reason to prevent Mercury auto-reconnect
1098
- // during unregister. Without this, disconnect() defaults to code 1000/"Done" which
1099
- // force-closes as "Done (forced)" - a normalReconnectReason that triggers auto-reconnect,
1100
- // causing a race condition with device.unregister().
1101
- .disconnect({
1102
- code: 3050,
1103
- reason: 'meetings unregister'
1104
- })
1105
- // @ts-ignore
1106
- .then(function () {
1107
- return _this7.webex.internal.device.unregister();
1108
- }).catch(function (error) {
1109
- // If error status code is 404, continue the chain
1110
- if (error.statusCode === 404) {
1111
- _loggerProxy.default.logger.info('Meetings:index#unregister --> 404 error during device unregister, proceeding normally');
1112
- return; // returning undefined allows the chain to continue
1113
- }
1114
- // For any other status code, break the chain by rethrowing
1115
- _loggerProxy.default.logger.error("Meetings:index#unregister --> Failed to unregister device: ".concat(error.message));
1116
- throw error; // rethrow to break the promise chain
1117
- }).then(function () {
1118
- _triggerProxy.default.trigger(_this7, {
1119
- file: 'meetings',
1120
- function: 'unregister'
1121
- }, _constants.EVENT_TRIGGERS.MEETINGS_UNREGISTERED);
1122
- _this7.registered = false;
1123
- _this7.registrationStatus = (0, _lodash.clone)(_constants.INITIAL_REGISTRATION_STATUS);
1124
- }).finally(function () {
1125
- _this7.unregistrationPromise = null;
1126
- });
1127
- return this.unregistrationPromise;
1021
+ return (
1022
+ // @ts-ignore
1023
+ this.webex.internal.mercury.disconnect()
1024
+ // @ts-ignore
1025
+ .then(function () {
1026
+ return _this7.webex.internal.device.unregister();
1027
+ }).catch(function (error) {
1028
+ // If error status code is 404, continue the chain
1029
+ if (error.statusCode === 404) {
1030
+ _loggerProxy.default.logger.info('Meetings:index#unregister --> 404 error during device unregister, proceeding normally');
1031
+ return; // returning undefined allows the chain to continue
1032
+ }
1033
+ // For any other status code, break the chain by rethrowing
1034
+ _loggerProxy.default.logger.error("Meetings:index#unregister --> Failed to unregister device: ".concat(error.message));
1035
+ throw error; // rethrow to break the promise chain
1036
+ }).then(function () {
1037
+ _triggerProxy.default.trigger(_this7, {
1038
+ file: 'meetings',
1039
+ function: 'unregister'
1040
+ }, _constants.EVENT_TRIGGERS.MEETINGS_UNREGISTERED);
1041
+ _this7.registered = false;
1042
+ _this7.registrationStatus = (0, _lodash.clone)(_constants.INITIAL_REGISTRATION_STATUS);
1043
+ })
1044
+ );
1128
1045
  }
1129
1046
  }, {
1130
1047
  key: "uploadLogs",
@@ -1852,7 +1769,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1852
1769
  }
1853
1770
  var associateBreakoutLocus = this.breakoutLocusForHandleLater[existIndex];
1854
1771
  this.handleLocusEvent({
1855
- eventType: _constants.LOCUSEVENT.SDK_LOCUS_FROM_SYNC_MEETINGS,
1772
+ eventType: _constants.LOCUSEVENT.SDK_NO_EVENT,
1856
1773
  locus: associateBreakoutLocus,
1857
1774
  locusUrl: associateBreakoutLocus.url
1858
1775
  });