@webex/plugin-meetings 3.7.0-next.44 → 3.7.0-next.46

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/src/constants.ts CHANGED
@@ -36,6 +36,8 @@ export const HOST = 'host';
36
36
 
37
37
  export const JOIN = 'join';
38
38
 
39
+ export const JOIN_LINK_MTID = 'MTID';
40
+
39
41
  export const LEAVE = 'leave';
40
42
  export const LIVE = 'live';
41
43
  export const LOCAL = 'local';
@@ -19,6 +19,7 @@ import {
19
19
  UUID_REG,
20
20
  VALID_EMAIL_ADDRESS,
21
21
  DEFAULT_MEETING_INFO_REQUEST_BODY,
22
+ JOIN_LINK_MTID,
22
23
  } from '../constants';
23
24
  import ParameterError from '../common/errors/parameter';
24
25
  import LoggerProxy from '../common/logs/logger-proxy';
@@ -70,7 +71,8 @@ export default class MeetingInfoUtil {
70
71
  parsedUrl.pathname.includes(`/${MEET_M}`) ||
71
72
  parsedUrl.pathname.includes(`/${MEET_CISCO}`) ||
72
73
  parsedUrl.pathname.includes(`/${MEET_CO}`) ||
73
- parsedUrl.pathname.includes(`/${JOIN}`));
74
+ parsedUrl.pathname.includes(`/${JOIN}`) ||
75
+ (parsedUrl.search && parsedUrl.search.includes(JOIN_LINK_MTID)));
74
76
  }
75
77
 
76
78
  return hostNameBool && pathNameBool;
@@ -699,6 +699,20 @@ export default class Meetings extends WebexPlugin {
699
699
  });
700
700
  }
701
701
 
702
+ /**
703
+ * API to change log upload interval. Setting the factor to 0 will disable periodic log uploads.
704
+ *
705
+ * @param {number} factor new factor value
706
+ * @returns {void}
707
+ */
708
+ private _setLogUploadIntervalMultiplicationFactor(factor: number) {
709
+ if (typeof factor !== 'number') {
710
+ return;
711
+ }
712
+ // @ts-ignore
713
+ this.config.logUploadIntervalMultiplicationFactor = factor;
714
+ }
715
+
702
716
  /**
703
717
  * API to toggle unified meetings
704
718
  * @param {Boolean} changeState
@@ -345,5 +345,22 @@ describe('plugin-meetings', () => {
345
345
  );
346
346
  });
347
347
  });
348
+
349
+ describe('#isMeetingLink', () => {
350
+ it('should return true for valid join meeting link with MTID', () => {
351
+ const result = MeetingInfoUtil.isMeetingLink('https://cisco.webex.com/cisco/j.php?MTID=m9fe0afd8c435e892afcce9ea25b97046');
352
+ expect(result).to.be.true;
353
+ });
354
+
355
+ it('should return true for valid join meeting link without cisco domain', () => {
356
+ const result = MeetingInfoUtil.isMeetingLink('https://test.webex.com/test/j.php?MTID=m9fe0afd8c435e892afcce9ea25b97046');
357
+ expect(result).to.be.true;
358
+ });
359
+
360
+ it('should return false for an invalid meeting link', () => {
361
+ const result = MeetingInfoUtil.isMeetingLink('https://test.webex.com/test/j.php?MiD=m9fe0afd8c435e892afcce9ea25b97046');
362
+ expect(result).to.be.false;
363
+ });
364
+ });
348
365
  });
349
366
  });
@@ -268,6 +268,33 @@ describe('plugin-meetings', () => {
268
268
  });
269
269
  });
270
270
 
271
+ describe('#_setLogUploadIntervalMultiplicationFactor', () => {
272
+ it('should have _setLogUploadIntervalMultiplicationFactor', () => {
273
+ assert.equal(typeof webex.meetings._setLogUploadIntervalMultiplicationFactor, 'function');
274
+ });
275
+
276
+ describe('success', () => {
277
+ it('should update the config', () => {
278
+ const someValue = 1.23;
279
+
280
+ webex.meetings._setLogUploadIntervalMultiplicationFactor(someValue);
281
+ assert.equal(webex.meetings.config.logUploadIntervalMultiplicationFactor, someValue);
282
+ });
283
+ });
284
+
285
+ describe('failure', () => {
286
+ it('should not accept non-number input', () => {
287
+ const logUploadIntervalMultiplicationFactor = webex.meetings.config.logUploadIntervalMultiplicationFactor;
288
+
289
+ webex.meetings._setLogUploadIntervalMultiplicationFactor('test');
290
+ assert.equal(
291
+ webex.meetings.config.logUploadIntervalMultiplicationFactor,
292
+ logUploadIntervalMultiplicationFactor
293
+ );
294
+ });
295
+ });
296
+ });
297
+
271
298
  describe('#_toggleUnifiedMeetings', () => {
272
299
  it('should have toggleUnifiedMeetings', () => {
273
300
  assert.equal(typeof webex.meetings._toggleUnifiedMeetings, 'function');