@webex/plugin-meetings 3.12.0-next.121 → 3.12.0-next.123

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.
@@ -869,7 +869,7 @@ var Webinar = _webexCore.WebexPlugin.extend({
869
869
  }, _callee1);
870
870
  }))();
871
871
  },
872
- version: "3.12.0-next.121"
872
+ version: "3.12.0-next.123"
873
873
  });
874
874
  var _default = exports.default = Webinar;
875
875
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -94,5 +94,5 @@
94
94
  "//": [
95
95
  "TODO: upgrade jwt-decode when moving to node 18"
96
96
  ],
97
- "version": "3.12.0-next.121"
97
+ "version": "3.12.0-next.123"
98
98
  }
@@ -158,6 +158,8 @@ const Breakouts = WebexPlugin.extend({
158
158
  this.listenToCurrentSessionTypeChange();
159
159
  this.listenToBreakoutRosters();
160
160
  this.listenToBreakoutHelp();
161
+ // LLM may connect after locusUrlUpdate has already run, so re-check the broadcast subscription on connect
162
+ this.listenTo(this.webex.internal.llm, 'online', () => this.listenToBroadcastMessages());
161
163
  // @ts-ignore
162
164
  this.breakoutRequest = new BreakoutRequest({webex: this.webex});
163
165
  },
@@ -264,7 +266,16 @@ const Breakouts = WebexPlugin.extend({
264
266
  * @returns {void}
265
267
  */
266
268
  listenToBroadcastMessages() {
267
- if (!this.webex.internal.llm.isConnected() || this.hasSubscribedToMessage) {
269
+ // Only subscribe when the connected LLM session belongs to this meeting's locus. locusUrl is
270
+ // populated before the socket emits 'online', so it is reliable even on the first connection
271
+ // where the owner meeting id has not been tagged yet.
272
+ const isLLMForThisMeeting = this.webex.internal.llm.getLocusUrl() === this.locusUrl;
273
+
274
+ if (
275
+ !this.webex.internal.llm.isConnected() ||
276
+ !isLLMForThisMeeting ||
277
+ this.hasSubscribedToMessage
278
+ ) {
268
279
  return;
269
280
  }
270
281
 
@@ -2866,6 +2866,7 @@ export default class LocusInfo extends EventsScope {
2866
2866
  {
2867
2867
  muted: parsedSelves.current.remoteMuted,
2868
2868
  unmuteAllowed: parsedSelves.current.unmuteAllowed,
2869
+ modifiedBy: parsedSelves.current.modifiedBy ?? null,
2869
2870
  }
2870
2871
  );
2871
2872
  }
@@ -88,6 +88,7 @@ describe('plugin-meetings', () => {
88
88
  webex = new MockWebex({});
89
89
  webex.internal.llm.on = sinon.stub();
90
90
  webex.internal.llm.isConnected = sinon.stub();
91
+ webex.internal.llm.getLocusUrl = sinon.stub().returns('newUrl');
91
92
  webex.internal.mercury.on = sinon.stub();
92
93
  breakouts = new Breakouts({}, {parent: webex});
93
94
  breakouts.groupId = 'groupId';
@@ -649,6 +650,15 @@ describe('plugin-meetings', () => {
649
650
  assert.notCalled(breakouts.listenTo);
650
651
  });
651
652
 
653
+ it('do not subscribe message if the connected llm does not belong to this meeting', () => {
654
+ webex.internal.llm.isConnected = sinon.stub().returns(true);
655
+ webex.internal.llm.getLocusUrl = sinon.stub().returns('anotherMeetingLocusUrl');
656
+ breakouts.listenTo = sinon.stub();
657
+ breakouts.locusUrlUpdate('newUrl');
658
+ assert.equal(breakouts.locusUrl, 'newUrl');
659
+ assert.notCalled(breakouts.listenTo);
660
+ });
661
+
652
662
  it('do not subscribe message if already done', () => {
653
663
  webex.internal.llm.isConnected = sinon.stub().returns(true);
654
664
  breakouts.hasSubscribedToMessage = true;
@@ -661,7 +671,9 @@ describe('plugin-meetings', () => {
661
671
  it('triggers message event when a message received', () => {
662
672
  webex.internal.llm.isConnected = sinon.stub().returns(true);
663
673
  breakouts.locusUrlUpdate('newUrl');
664
- const call = webex.internal.llm.on.getCall(0);
674
+ const call = webex.internal.llm.on
675
+ .getCalls()
676
+ .find((c) => c.args[0] === 'event:breakout.message');
665
677
  const callback = call.args[1];
666
678
 
667
679
  assert.equal(call.args[0], 'event:breakout.message');
@@ -689,6 +701,25 @@ describe('plugin-meetings', () => {
689
701
  sessionId: 'sessionId',
690
702
  });
691
703
  });
704
+
705
+ it('re-checks the subscription when the llm emits online', () => {
706
+ const onlineCall = webex.internal.llm.on
707
+ .getCalls()
708
+ .find((c) => c.args[0] === 'online');
709
+ assert.exists(onlineCall, 'expected an online listener to be registered');
710
+ const onlineHandler = onlineCall.args[1];
711
+
712
+ webex.internal.llm.isConnected = sinon.stub().returns(true);
713
+ webex.internal.llm.getLocusUrl = sinon.stub().returns(breakouts.locusUrl);
714
+
715
+ onlineHandler.call(breakouts);
716
+
717
+ const call = webex.internal.llm.on
718
+ .getCalls()
719
+ .find((c) => c.args[0] === 'event:breakout.message');
720
+ assert.exists(call, 'expected broadcast message subscription after online');
721
+ assert.isTrue(breakouts.hasSubscribedToMessage);
722
+ });
692
723
  });
693
724
 
694
725
  describe('#updateCanManageBreakouts', () => {
@@ -2448,6 +2448,7 @@ describe('plugin-meetings', () => {
2448
2448
 
2449
2449
  selfWithLocalUnmuteRequired.controls.audio.muted = false;
2450
2450
  selfWithLocalUnmuteRequired.controls.audio.localAudioUnmuteRequired = true;
2451
+ selfWithLocalUnmuteRequired.controls.audio.meta = {modifiedBy: 'host-uuid-123'};
2451
2452
 
2452
2453
  locusInfo.emitScoped = sinon.stub();
2453
2454
  locusInfo.updateSelf(selfWithLocalUnmuteRequired);
@@ -2462,6 +2463,33 @@ describe('plugin-meetings', () => {
2462
2463
  {
2463
2464
  muted: false,
2464
2465
  unmuteAllowed: true,
2466
+ modifiedBy: 'host-uuid-123',
2467
+ }
2468
+ );
2469
+ });
2470
+
2471
+ it('should set modifiedBy to null on LOCAL_UNMUTE_REQUIRED when it is unavailable', () => {
2472
+ locusInfo.webex.internal.device.url = self.deviceUrl;
2473
+ locusInfo.updateSelf(self);
2474
+ const selfWithLocalUnmuteRequired = cloneDeep(self);
2475
+
2476
+ selfWithLocalUnmuteRequired.controls.audio.muted = false;
2477
+ selfWithLocalUnmuteRequired.controls.audio.localAudioUnmuteRequired = true;
2478
+
2479
+ locusInfo.emitScoped = sinon.stub();
2480
+ locusInfo.updateSelf(selfWithLocalUnmuteRequired);
2481
+
2482
+ assert.calledWith(
2483
+ locusInfo.emitScoped,
2484
+ {
2485
+ file: 'locus-info',
2486
+ function: 'updateSelf',
2487
+ },
2488
+ LOCUSINFO.EVENTS.LOCAL_UNMUTE_REQUIRED,
2489
+ {
2490
+ muted: false,
2491
+ unmuteAllowed: true,
2492
+ modifiedBy: null,
2465
2493
  }
2466
2494
  );
2467
2495
  });