@webex/plugin-meetings 2.29.0 → 2.29.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.
@@ -331,7 +331,7 @@ var MeetingInfoV2 = /*#__PURE__*/function () {
331
331
  case 5:
332
332
  destinationType = _context2.sent;
333
333
 
334
- if (!(destinationType.type === _constants._CONVERSATION_URL_ && this.webex.config.meetings.experimental.enableAdhocMeetings)) {
334
+ if (!(destinationType.type === _constants._CONVERSATION_URL_ && this.webex.config.meetings.experimental.enableAdhocMeetings && this.webex.meetings.preferredWebexSite)) {
335
335
  _context2.next = 8;
336
336
  break;
337
337
  }
@@ -1 +1 @@
1
- {"version":3,"names":["PASSWORD_ERROR_DEFAULT_MESSAGE","CAPTCHA_ERROR_DEFAULT_MESSAGE","ADHOC_MEETING_DEFAULT_ERROR","CAPTCHA_ERROR_REQUIRES_PASSWORD_CODES","MeetingInfoV2PasswordError","wbxAppApiErrorCode","meetingInfo","message","name","sdkMessage","stack","Error","wbxAppApiCode","MeetingInfoV2AdhocMeetingError","MeetingInfoV2CaptchaError","captchaInfo","isPasswordRequired","includes","MeetingInfoV2","webex","destination","type","MeetingInfoUtil","getDestinationType","conversationUrl","meetings","preferredWebexSite","getInvitees","particpants","invitees","forEach","participant","push","email","emailAddress","ciUserUuid","entryUUID","internal","conversation","get","url","includeParticipants","disableTransform","then","body","title","displayName","spaceUrl","keyUrl","encryptionKeyUrl","kroUrl","kmsResourceObjectUrl","participants","items","uri","Metrics","sendBehavioralMetric","BEHAVIORAL_METRICS","ADHOC_MEETING_SUCCESS","request","method","HTTP_VERBS","POST","catch","err","ADHOC_MEETING_FAILURE","reason","code","password","destinationType","_CONVERSATION_URL_","config","experimental","enableAdhocMeetings","createAdhocSpaceMeeting","getRequestBody","options","getDirectMeetingInfoURI","directURI","service","WBXAPPAPI_SERVICE","resource","response","FETCH_MEETING_INFO_V1_SUCCESS","statusCode","VERIFY_PASSWORD_ERROR","data","VERIFY_CAPTCHA_ERROR","captchaId","captchaID","verificationImageURL","verificationAudioURL","refreshURL","FETCH_MEETING_INFO_V1_FAILURE"],"sources":["meeting-info-v2.js"],"sourcesContent":["\nimport {HTTP_VERBS, _CONVERSATION_URL_, WBXAPPAPI_SERVICE} from '../constants';\nimport Metrics from '../metrics';\nimport BEHAVIORAL_METRICS from '../metrics/constants';\n\nimport MeetingInfoUtil from './utilv2';\n\nconst PASSWORD_ERROR_DEFAULT_MESSAGE = 'Password required. Call fetchMeetingInfo() with password argument';\nconst CAPTCHA_ERROR_DEFAULT_MESSAGE = 'Captcha required. Call fetchMeetingInfo() with captchaInfo argument';\nconst ADHOC_MEETING_DEFAULT_ERROR = 'Failed starting the adhoc meeting, Please contact support team ';\nconst CAPTCHA_ERROR_REQUIRES_PASSWORD_CODES = [423005, 423006];\n\n/**\n * Error to indicate that wbxappapi requires a password\n */\nexport class MeetingInfoV2PasswordError extends Error {\n /**\n *\n * @constructor\n * @param {Number} [wbxAppApiErrorCode]\n * @param {Object} [meetingInfo]\n * @param {String} [message]\n */\n constructor(wbxAppApiErrorCode, meetingInfo, message = PASSWORD_ERROR_DEFAULT_MESSAGE) {\n super(`${message}, code=${wbxAppApiErrorCode}`);\n this.name = 'MeetingInfoV2PasswordError';\n this.sdkMessage = message;\n this.stack = (new Error()).stack;\n this.wbxAppApiCode = wbxAppApiErrorCode;\n this.meetingInfo = meetingInfo;\n }\n}\n\n/**\n * Error generating a adhoc space meeting\n */\nexport class MeetingInfoV2AdhocMeetingError extends Error {\n /**\n *\n * @constructor\n * @param {Number} [wbxAppApiErrorCode]\n * @param {String} [message]\n */\n constructor(wbxAppApiErrorCode, message = ADHOC_MEETING_DEFAULT_ERROR) {\n super(`${message}, code=${wbxAppApiErrorCode}`);\n this.name = 'MeetingInfoV2AdhocMeetingError';\n this.sdkMessage = message;\n this.stack = (new Error()).stack;\n this.wbxAppApiCode = wbxAppApiErrorCode;\n }\n}\n\n\n/**\n * Error to indicate that preferred webex site not present to start adhoc meeting\n */\nexport class MeetingInfoV2CaptchaError extends Error {\n /**\n *\n * @constructor\n * @param {Number} [wbxAppApiErrorCode]\n * @param {Object} [captchaInfo]\n * @param {String} [message]\n */\n constructor(wbxAppApiErrorCode, captchaInfo, message = CAPTCHA_ERROR_DEFAULT_MESSAGE) {\n super(`${message}, code=${wbxAppApiErrorCode}`);\n this.name = 'MeetingInfoV2PasswordError';\n this.sdkMessage = message;\n this.stack = (new Error()).stack;\n this.wbxAppApiCode = wbxAppApiErrorCode;\n this.isPasswordRequired = CAPTCHA_ERROR_REQUIRES_PASSWORD_CODES.includes(wbxAppApiErrorCode);\n this.captchaInfo = captchaInfo;\n }\n}\n\n/**\n * @class MeetingInfo\n */\nexport default class MeetingInfoV2 {\n /**\n *\n * @param {WebexSDK} webex\n */\n constructor(webex) {\n this.webex = webex;\n }\n\n /**\n * converts hydra id into conversation url and persons Id\n * @param {String} destination one of many different types of destinations to look up info for\n * @param {String} [type] to match up with the destination value\n * @returns {Promise} destination and type\n * @public\n * @memberof MeetingInfo\n */\n fetchInfoOptions(destination, type = null) {\n return MeetingInfoUtil.getDestinationType({\n destination,\n type,\n webex: this.webex\n });\n }\n\n /**\n * Creates adhoc space meetings for a space by fetching the conversation infomation\n * @param {String} conversationUrl conversationUrl to start adhoc meeting on\n * @returns {Promise} returns a meeting info object\n * @public\n * @memberof MeetingInfo\n */\n async createAdhocSpaceMeeting(conversationUrl) {\n if (!this.webex.meetings.preferredWebexSite) {\n throw Error('No preferred webex site found');\n }\n const getInvitees = (particpants = []) => {\n const invitees = [];\n\n if (particpants) {\n particpants.forEach((participant) => {\n invitees.push({\n email: participant.emailAddress,\n ciUserUuid: participant.entryUUID\n });\n });\n }\n\n return invitees;\n };\n\n return this.webex.internal.conversation.get(\n {url: conversationUrl},\n {includeParticipants: true, disableTransform: true}\n )\n .then((conversation) => {\n const body = {\n title: conversation.displayName,\n spaceUrl: conversation.url,\n keyUrl: conversation.encryptionKeyUrl,\n kroUrl: conversation.kmsResourceObjectUrl,\n invitees: getInvitees(conversation.participants?.items)\n };\n\n const uri = this.webex.meetings.preferredWebexSite ?\n `https://${this.webex.meetings.preferredWebexSite}/wbxappapi/v2/meetings/spaceInstant` : '';\n\n Metrics.sendBehavioralMetric(\n BEHAVIORAL_METRICS.ADHOC_MEETING_SUCCESS\n );\n\n return this.webex.request({\n method: HTTP_VERBS.POST,\n uri,\n body\n });\n })\n .catch((err) => {\n Metrics.sendBehavioralMetric(\n BEHAVIORAL_METRICS.ADHOC_MEETING_FAILURE,\n {\n reason: err.message,\n stack: err.stack\n }\n );\n throw new MeetingInfoV2AdhocMeetingError(err.body?.code, err.body?.message);\n });\n }\n\n /**\n * Fetches meeting info from the server\n * @param {String} destination one of many different types of destinations to look up info for\n * @param {String} [type] to match up with the destination value\n * @param {String} password\n * @param {Object} captchaInfo\n * @param {String} captchaInfo.code\n * @param {String} captchaInfo.id\n * @returns {Promise} returns a meeting info object\n * @public\n * @memberof MeetingInfo\n */\n async fetchMeetingInfo(destination, type = null, password = null, captchaInfo = null) {\n const destinationType = await MeetingInfoUtil.getDestinationType({\n destination,\n type,\n webex: this.webex\n });\n\n if (destinationType.type === _CONVERSATION_URL_ && this.webex.config.meetings.experimental.enableAdhocMeetings) {\n return this.createAdhocSpaceMeeting(destinationType.destination);\n }\n\n const body = await MeetingInfoUtil.getRequestBody({...destinationType, password, captchaInfo});\n\n const options = {\n method: HTTP_VERBS.POST,\n body\n };\n\n const directURI = await MeetingInfoUtil.getDirectMeetingInfoURI(destinationType);\n\n if (directURI) {\n options.uri = directURI;\n }\n else {\n options.service = WBXAPPAPI_SERVICE;\n options.resource = 'meetingInfo';\n }\n\n return this.webex.request(options)\n .then((response) => {\n Metrics.sendBehavioralMetric(\n BEHAVIORAL_METRICS.FETCH_MEETING_INFO_V1_SUCCESS\n );\n\n return response;\n })\n .catch((err) => {\n if (err?.statusCode === 403) {\n Metrics.sendBehavioralMetric(\n BEHAVIORAL_METRICS.VERIFY_PASSWORD_ERROR,\n {\n reason: err.message,\n stack: err.stack\n }\n );\n\n throw new MeetingInfoV2PasswordError(err.body?.code, err.body?.data?.meetingInfo);\n }\n if (err?.statusCode === 423) {\n Metrics.sendBehavioralMetric(\n BEHAVIORAL_METRICS.VERIFY_CAPTCHA_ERROR,\n {\n reason: err.message,\n stack: err.stack\n }\n );\n\n throw new MeetingInfoV2CaptchaError(err.body?.code, {\n captchaId: err.body.captchaID,\n verificationImageURL: err.body.verificationImageURL,\n verificationAudioURL: err.body.verificationAudioURL,\n refreshURL: err.body.refreshURL\n });\n }\n\n Metrics.sendBehavioralMetric(\n BEHAVIORAL_METRICS.FETCH_MEETING_INFO_V1_FAILURE,\n {\n reason: err.message,\n stack: err.stack\n }\n );\n throw err;\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AACA;;AACA;;AAEA;;;;;;;;;;AAEA,IAAMA,8BAA8B,GAAG,mEAAvC;AACA,IAAMC,6BAA6B,GAAG,qEAAtC;AACA,IAAMC,2BAA2B,GAAG,iEAApC;AACA,IAAMC,qCAAqC,GAAG,CAAC,MAAD,EAAS,MAAT,CAA9C;AAEA;AACA;AACA;;IACaC,0B;;;;;EACX;AACF;AACA;AACA;AACA;AACA;AACA;EACE,oCAAYC,kBAAZ,EAAgCC,WAAhC,EAAuF;IAAA;;IAAA,IAA1CC,OAA0C,uEAAhCP,8BAAgC;IAAA;IACrF,oCAASO,OAAT,oBAA0BF,kBAA1B;IACA,MAAKG,IAAL,GAAY,4BAAZ;IACA,MAAKC,UAAL,GAAkBF,OAAlB;IACA,MAAKG,KAAL,GAAc,IAAIC,KAAJ,EAAD,CAAcD,KAA3B;IACA,MAAKE,aAAL,GAAqBP,kBAArB;IACA,MAAKC,WAAL,GAAmBA,WAAnB;IANqF;EAOtF;;;+CAf6CK,K;AAkBhD;AACA;AACA;;;;;IACaE,8B;;;;;EACX;AACF;AACA;AACA;AACA;AACA;EACE,wCAAYR,kB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AAzD,oDAA+C,gBAAgBhF,WAA/D,CAAN;kBACD;;kBACD,IAAI,CAAA0D,GAAG,SAAH,IAAAA,GAAG,WAAH,YAAAA,GAAG,CAAEoB,UAAL,MAAoB,GAAxB,EAA6B;oBAAA;;oBAC3B7B,gBAAA,CAAQC,oBAAR,CACEC,mBAAA,CAAmB8B,oBADrB,EAEE;sBACErB,MAAM,EAAEF,GAAG,CAACzD,OADd;sBAEEG,KAAK,EAAEsD,GAAG,CAACtD;oBAFb,CAFF;;oBAQA,MAAM,IAAII,yBAAJ,eAA8BkD,GAAG,CAACpB,IAAlC,+CAA8B,WAAUuB,IAAxC,EAA8C;sBAClDqB,SAAS,EAAExB,GAAG,CAACpB,IAAJ,CAAS6C,SAD8B;sBAElDC,oBAAoB,EAAE1B,GAAG,CAACpB,IAAJ,CAAS8C,oBAFmB;sBAGlDC,oBAAoB,EAAE3B,GAAG,CAACpB,IAAJ,CAAS+C,oBAHmB;sBAIlDC,UAAU,EAAE5B,GAAG,CAACpB,IAAJ,CAASgD;oBAJ6B,CAA9C,CAAN;kBAMD;;kBAEDrC,gBAAA,CAAQC,oBAAR,CACEC,mBAAA,CAAmBoC,6BADrB,EAEE;oBACE3B,MAAM,EAAEF,GAAG,CAACzD,OADd;oBAEEG,KAAK,EAAEsD,GAAG,CAACtD;kBAFb,CAFF;;kBAOA,MAAMsD,GAAN;gBACD,CA7CI,CA5BT;;cAAA;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA,C"}
1
+ {"version":3,"names":["PASSWORD_ERROR_DEFAULT_MESSAGE","CAPTCHA_ERROR_DEFAULT_MESSAGE","ADHOC_MEETING_DEFAULT_ERROR","CAPTCHA_ERROR_REQUIRES_PASSWORD_CODES","MeetingInfoV2PasswordError","wbxAppApiErrorCode","meetingInfo","message","name","sdkMessage","stack","Error","wbxAppApiCode","MeetingInfoV2AdhocMeetingError","MeetingInfoV2CaptchaError","captchaInfo","isPasswordRequired","includes","MeetingInfoV2","webex","destination","type","MeetingInfoUtil","getDestinationType","conversationUrl","meetings","preferredWebexSite","getInvitees","particpants","invitees","forEach","participant","push","email","emailAddress","ciUserUuid","entryUUID","internal","conversation","get","url","includeParticipants","disableTransform","then","body","title","displayName","spaceUrl","keyUrl","encryptionKeyUrl","kroUrl","kmsResourceObjectUrl","participants","items","uri","Metrics","sendBehavioralMetric","BEHAVIORAL_METRICS","ADHOC_MEETING_SUCCESS","request","method","HTTP_VERBS","POST","catch","err","ADHOC_MEETING_FAILURE","reason","code","password","destinationType","_CONVERSATION_URL_","config","experimental","enableAdhocMeetings","createAdhocSpaceMeeting","getRequestBody","options","getDirectMeetingInfoURI","directURI","service","WBXAPPAPI_SERVICE","resource","response","FETCH_MEETING_INFO_V1_SUCCESS","statusCode","VERIFY_PASSWORD_ERROR","data","VERIFY_CAPTCHA_ERROR","captchaId","captchaID","verificationImageURL","verificationAudioURL","refreshURL","FETCH_MEETING_INFO_V1_FAILURE"],"sources":["meeting-info-v2.js"],"sourcesContent":["\nimport {HTTP_VERBS, _CONVERSATION_URL_, WBXAPPAPI_SERVICE} from '../constants';\nimport Metrics from '../metrics';\nimport BEHAVIORAL_METRICS from '../metrics/constants';\n\nimport MeetingInfoUtil from './utilv2';\n\nconst PASSWORD_ERROR_DEFAULT_MESSAGE = 'Password required. Call fetchMeetingInfo() with password argument';\nconst CAPTCHA_ERROR_DEFAULT_MESSAGE = 'Captcha required. Call fetchMeetingInfo() with captchaInfo argument';\nconst ADHOC_MEETING_DEFAULT_ERROR = 'Failed starting the adhoc meeting, Please contact support team ';\nconst CAPTCHA_ERROR_REQUIRES_PASSWORD_CODES = [423005, 423006];\n\n/**\n * Error to indicate that wbxappapi requires a password\n */\nexport class MeetingInfoV2PasswordError extends Error {\n /**\n *\n * @constructor\n * @param {Number} [wbxAppApiErrorCode]\n * @param {Object} [meetingInfo]\n * @param {String} [message]\n */\n constructor(wbxAppApiErrorCode, meetingInfo, message = PASSWORD_ERROR_DEFAULT_MESSAGE) {\n super(`${message}, code=${wbxAppApiErrorCode}`);\n this.name = 'MeetingInfoV2PasswordError';\n this.sdkMessage = message;\n this.stack = (new Error()).stack;\n this.wbxAppApiCode = wbxAppApiErrorCode;\n this.meetingInfo = meetingInfo;\n }\n}\n\n/**\n * Error generating a adhoc space meeting\n */\nexport class MeetingInfoV2AdhocMeetingError extends Error {\n /**\n *\n * @constructor\n * @param {Number} [wbxAppApiErrorCode]\n * @param {String} [message]\n */\n constructor(wbxAppApiErrorCode, message = ADHOC_MEETING_DEFAULT_ERROR) {\n super(`${message}, code=${wbxAppApiErrorCode}`);\n this.name = 'MeetingInfoV2AdhocMeetingError';\n this.sdkMessage = message;\n this.stack = (new Error()).stack;\n this.wbxAppApiCode = wbxAppApiErrorCode;\n }\n}\n\n\n/**\n * Error to indicate that preferred webex site not present to start adhoc meeting\n */\nexport class MeetingInfoV2CaptchaError extends Error {\n /**\n *\n * @constructor\n * @param {Number} [wbxAppApiErrorCode]\n * @param {Object} [captchaInfo]\n * @param {String} [message]\n */\n constructor(wbxAppApiErrorCode, captchaInfo, message = CAPTCHA_ERROR_DEFAULT_MESSAGE) {\n super(`${message}, code=${wbxAppApiErrorCode}`);\n this.name = 'MeetingInfoV2PasswordError';\n this.sdkMessage = message;\n this.stack = (new Error()).stack;\n this.wbxAppApiCode = wbxAppApiErrorCode;\n this.isPasswordRequired = CAPTCHA_ERROR_REQUIRES_PASSWORD_CODES.includes(wbxAppApiErrorCode);\n this.captchaInfo = captchaInfo;\n }\n}\n\n/**\n * @class MeetingInfo\n */\nexport default class MeetingInfoV2 {\n /**\n *\n * @param {WebexSDK} webex\n */\n constructor(webex) {\n this.webex = webex;\n }\n\n /**\n * converts hydra id into conversation url and persons Id\n * @param {String} destination one of many different types of destinations to look up info for\n * @param {String} [type] to match up with the destination value\n * @returns {Promise} destination and type\n * @public\n * @memberof MeetingInfo\n */\n fetchInfoOptions(destination, type = null) {\n return MeetingInfoUtil.getDestinationType({\n destination,\n type,\n webex: this.webex\n });\n }\n\n /**\n * Creates adhoc space meetings for a space by fetching the conversation infomation\n * @param {String} conversationUrl conversationUrl to start adhoc meeting on\n * @returns {Promise} returns a meeting info object\n * @public\n * @memberof MeetingInfo\n */\n async createAdhocSpaceMeeting(conversationUrl) {\n if (!this.webex.meetings.preferredWebexSite) {\n throw Error('No preferred webex site found');\n }\n const getInvitees = (particpants = []) => {\n const invitees = [];\n\n if (particpants) {\n particpants.forEach((participant) => {\n invitees.push({\n email: participant.emailAddress,\n ciUserUuid: participant.entryUUID\n });\n });\n }\n\n return invitees;\n };\n\n return this.webex.internal.conversation.get(\n {url: conversationUrl},\n {includeParticipants: true, disableTransform: true}\n )\n .then((conversation) => {\n const body = {\n title: conversation.displayName,\n spaceUrl: conversation.url,\n keyUrl: conversation.encryptionKeyUrl,\n kroUrl: conversation.kmsResourceObjectUrl,\n invitees: getInvitees(conversation.participants?.items)\n };\n\n const uri = this.webex.meetings.preferredWebexSite ?\n `https://${this.webex.meetings.preferredWebexSite}/wbxappapi/v2/meetings/spaceInstant` : '';\n\n Metrics.sendBehavioralMetric(\n BEHAVIORAL_METRICS.ADHOC_MEETING_SUCCESS\n );\n\n return this.webex.request({\n method: HTTP_VERBS.POST,\n uri,\n body\n });\n })\n .catch((err) => {\n Metrics.sendBehavioralMetric(\n BEHAVIORAL_METRICS.ADHOC_MEETING_FAILURE,\n {\n reason: err.message,\n stack: err.stack\n }\n );\n throw new MeetingInfoV2AdhocMeetingError(err.body?.code, err.body?.message);\n });\n }\n\n /**\n * Fetches meeting info from the server\n * @param {String} destination one of many different types of destinations to look up info for\n * @param {String} [type] to match up with the destination value\n * @param {String} password\n * @param {Object} captchaInfo\n * @param {String} captchaInfo.code\n * @param {String} captchaInfo.id\n * @returns {Promise} returns a meeting info object\n * @public\n * @memberof MeetingInfo\n */\n async fetchMeetingInfo(destination, type = null, password = null, captchaInfo = null) {\n const destinationType = await MeetingInfoUtil.getDestinationType({\n destination,\n type,\n webex: this.webex\n });\n\n if (destinationType.type === _CONVERSATION_URL_ && this.webex.config.meetings.experimental.enableAdhocMeetings && this.webex.meetings.preferredWebexSite) {\n return this.createAdhocSpaceMeeting(destinationType.destination);\n }\n\n const body = await MeetingInfoUtil.getRequestBody({...destinationType, password, captchaInfo});\n\n const options = {\n method: HTTP_VERBS.POST,\n body\n };\n\n const directURI = await MeetingInfoUtil.getDirectMeetingInfoURI(destinationType);\n\n if (directURI) {\n options.uri = directURI;\n }\n else {\n options.service = WBXAPPAPI_SERVICE;\n options.resource = 'meetingInfo';\n }\n\n return this.webex.request(options)\n .then((response) => {\n Metrics.sendBehavioralMetric(\n BEHAVIORAL_METRICS.FETCH_MEETING_INFO_V1_SUCCESS\n );\n\n return response;\n })\n .catch((err) => {\n if (err?.statusCode === 403) {\n Metrics.sendBehavioralMetric(\n BEHAVIORAL_METRICS.VERIFY_PASSWORD_ERROR,\n {\n reason: err.message,\n stack: err.stack\n }\n );\n\n throw new MeetingInfoV2PasswordError(err.body?.code, err.body?.data?.meetingInfo);\n }\n if (err?.statusCode === 423) {\n Metrics.sendBehavioralMetric(\n BEHAVIORAL_METRICS.VERIFY_CAPTCHA_ERROR,\n {\n reason: err.message,\n stack: err.stack\n }\n );\n\n throw new MeetingInfoV2CaptchaError(err.body?.code, {\n captchaId: err.body.captchaID,\n verificationImageURL: err.body.verificationImageURL,\n verificationAudioURL: err.body.verificationAudioURL,\n refreshURL: err.body.refreshURL\n });\n }\n\n Metrics.sendBehavioralMetric(\n BEHAVIORAL_METRICS.FETCH_MEETING_INFO_V1_FAILURE,\n {\n reason: err.message,\n stack: err.stack\n }\n );\n throw err;\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AACA;;AACA;;AAEA;;;;;;;;;;AAEA,IAAMA,8BAA8B,GAAG,mEAAvC;AACA,IAAMC,6BAA6B,GAAG,qEAAtC;AACA,IAAMC,2BAA2B,GAAG,iEAApC;AACA,IAAMC,qCAAqC,GAAG,CAAC,MAAD,EA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;kBAMD;;kBAEDrC,gBAAA,CAAQC,oBAAR,CACEC,mBAAA,CAAmBoC,6BADrB,EAEE;oBACE3B,MAAM,EAAEF,GAAG,CAACzD,OADd;oBAEEG,KAAK,EAAEsD,GAAG,CAACtD;kBAFb,CAFF;;kBAOA,MAAMsD,GAAN;gBACD,CA7CI,CA5BT;;cAAA;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA,C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webex/plugin-meetings",
3
- "version": "2.29.0",
3
+ "version": "2.29.1",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -24,15 +24,15 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@babel/runtime-corejs2": "^7.14.8",
27
- "@webex/webex-core": "2.29.0",
28
- "@webex/internal-plugin-mercury": "2.29.0",
29
- "@webex/internal-plugin-conversation": "2.29.0",
27
+ "@webex/webex-core": "2.29.1",
28
+ "@webex/internal-plugin-mercury": "2.29.1",
29
+ "@webex/internal-plugin-conversation": "2.29.1",
30
30
  "webrtc-adapter": "^7.7.0",
31
31
  "lodash": "^4.17.21",
32
32
  "uuid": "^3.3.2",
33
33
  "global": "^4.4.0",
34
34
  "ip-anonymize": "^0.1.0",
35
- "@webex/common": "2.29.0",
35
+ "@webex/common": "2.29.1",
36
36
  "bowser": "^2.11.0",
37
37
  "sdp-transform": "^2.12.0",
38
38
  "btoa": "^1.2.1",
@@ -184,7 +184,7 @@ export default class MeetingInfoV2 {
184
184
  webex: this.webex
185
185
  });
186
186
 
187
- if (destinationType.type === _CONVERSATION_URL_ && this.webex.config.meetings.experimental.enableAdhocMeetings) {
187
+ if (destinationType.type === _CONVERSATION_URL_ && this.webex.config.meetings.experimental.enableAdhocMeetings && this.webex.meetings.preferredWebexSite) {
188
188
  return this.createAdhocSpaceMeeting(destinationType.destination);
189
189
  }
190
190
 
@@ -206,6 +206,16 @@ describe('plugin-meetings', () => {
206
206
  meetingInfo.createAdhocSpaceMeeting.restore();
207
207
  });
208
208
 
209
+ it('should not call createAdhocSpaceMeeting if enableAdhocMeetings toggle is on but preferredWebexSite', async () => {
210
+ sinon.stub(meetingInfo, 'createAdhocSpaceMeeting').returns(Promise.resolve());
211
+ webex.meetings.preferredWebexSite = undefined;
212
+
213
+ await meetingInfo.fetchMeetingInfo('conversationUrl', _CONVERSATION_URL_);
214
+
215
+ assert.notCalled(meetingInfo.createAdhocSpaceMeeting);
216
+ assert.called(webex.request);
217
+ meetingInfo.createAdhocSpaceMeeting.restore();
218
+ });
209
219
 
210
220
  it('should throw an error MeetingInfoV2AdhocMeetingError if not able to start adhoc meeting for a conversation', async () => {
211
221
  webex.config.meetings.experimental.enableAdhocMeetings = true;