@webex/plugin-meetings 3.12.0-mobius-socket.2 → 3.12.0-mobius-socket.3
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/AGENTS.md +9 -0
- package/dist/aiEnableRequest/index.js +15 -2
- package/dist/aiEnableRequest/index.js.map +1 -1
- package/dist/breakouts/breakout.js +8 -3
- package/dist/breakouts/breakout.js.map +1 -1
- package/dist/breakouts/index.js +3 -2
- package/dist/breakouts/index.js.map +1 -1
- package/dist/config.js +1 -0
- package/dist/config.js.map +1 -1
- package/dist/constants.js +6 -3
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/constants.js +11 -1
- package/dist/controls-options-manager/constants.js.map +1 -1
- package/dist/controls-options-manager/index.js +38 -24
- package/dist/controls-options-manager/index.js.map +1 -1
- package/dist/controls-options-manager/util.js +91 -0
- package/dist/controls-options-manager/util.js.map +1 -1
- package/dist/hashTree/constants.js +10 -1
- package/dist/hashTree/constants.js.map +1 -1
- package/dist/hashTree/hashTreeParser.js +651 -382
- 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/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/interceptors/locusRetry.js +23 -8
- package/dist/interceptors/locusRetry.js.map +1 -1
- package/dist/interpretation/index.js +10 -1
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/controlsUtils.js +4 -1
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/index.js +289 -87
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/types.js +19 -0
- package/dist/locus-info/types.js.map +1 -1
- package/dist/media/properties.js +1 -0
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +3 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +848 -582
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/util.js +19 -2
- package/dist/meeting/util.js.map +1 -1
- package/dist/meetings/index.js +205 -77
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/meetings.types.js +6 -1
- package/dist/meetings/meetings.types.js.map +1 -1
- package/dist/meetings/request.js +39 -0
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +67 -5
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +10 -0
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js.map +1 -1
- package/dist/member/util.js +3 -0
- package/dist/member/util.js.map +1 -1
- package/dist/metrics/constants.js +4 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/multistream/receiveSlot.js +9 -0
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/reactions/reactions.type.js.map +1 -1
- package/dist/recording-controller/index.js +1 -3
- package/dist/recording-controller/index.js.map +1 -1
- package/dist/types/config.d.ts +1 -0
- package/dist/types/constants.d.ts +2 -0
- package/dist/types/controls-options-manager/constants.d.ts +6 -1
- package/dist/types/controls-options-manager/index.d.ts +10 -0
- package/dist/types/hashTree/constants.d.ts +1 -0
- package/dist/types/hashTree/hashTreeParser.d.ts +83 -16
- package/dist/types/hashTree/utils.d.ts +11 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/interceptors/locusRetry.d.ts +4 -4
- package/dist/types/locus-info/index.d.ts +46 -6
- package/dist/types/locus-info/types.d.ts +21 -1
- package/dist/types/media/properties.d.ts +1 -0
- package/dist/types/meeting/in-meeting-actions.d.ts +2 -0
- package/dist/types/meeting/index.d.ts +65 -1
- package/dist/types/meeting/util.d.ts +8 -0
- package/dist/types/meetings/index.d.ts +20 -2
- package/dist/types/meetings/meetings.types.d.ts +15 -0
- package/dist/types/meetings/request.d.ts +14 -0
- package/dist/types/member/index.d.ts +1 -0
- package/dist/types/member/types.d.ts +1 -0
- package/dist/types/member/util.d.ts +1 -0
- package/dist/types/metrics/constants.d.ts +3 -0
- package/dist/types/reactions/reactions.type.d.ts +3 -0
- package/dist/webinar/index.js +68 -17
- package/dist/webinar/index.js.map +1 -1
- package/package.json +22 -22
- package/src/aiEnableRequest/index.ts +16 -0
- package/src/breakouts/breakout.ts +3 -1
- package/src/breakouts/index.ts +1 -0
- package/src/config.ts +1 -0
- package/src/constants.ts +5 -1
- package/src/controls-options-manager/constants.ts +14 -1
- package/src/controls-options-manager/index.ts +47 -24
- package/src/controls-options-manager/util.ts +81 -1
- package/src/hashTree/constants.ts +9 -0
- package/src/hashTree/hashTreeParser.ts +375 -197
- package/src/hashTree/utils.ts +17 -0
- package/src/index.ts +5 -0
- package/src/interceptors/locusRetry.ts +25 -4
- package/src/interpretation/index.ts +25 -8
- package/src/locus-info/controlsUtils.ts +3 -1
- package/src/locus-info/index.ts +291 -97
- package/src/locus-info/types.ts +25 -1
- package/src/media/properties.ts +1 -0
- package/src/meeting/in-meeting-actions.ts +4 -0
- package/src/meeting/index.ts +260 -23
- package/src/meeting/util.ts +20 -2
- package/src/meetings/index.ts +109 -43
- package/src/meetings/meetings.types.ts +19 -0
- package/src/meetings/request.ts +43 -0
- package/src/meetings/util.ts +80 -1
- package/src/member/index.ts +10 -0
- package/src/member/types.ts +1 -0
- package/src/member/util.ts +3 -0
- package/src/metrics/constants.ts +3 -0
- package/src/multistream/receiveSlot.ts +18 -0
- package/src/reactions/reactions.type.ts +3 -0
- package/src/recording-controller/index.ts +1 -2
- package/src/webinar/index.ts +88 -21
- package/test/unit/spec/aiEnableRequest/index.ts +86 -0
- package/test/unit/spec/breakouts/breakout.ts +9 -3
- package/test/unit/spec/breakouts/index.ts +2 -0
- package/test/unit/spec/controls-options-manager/index.js +140 -29
- package/test/unit/spec/controls-options-manager/util.js +165 -0
- package/test/unit/spec/hashTree/hashTreeParser.ts +1263 -157
- package/test/unit/spec/hashTree/utils.ts +88 -1
- package/test/unit/spec/interceptors/locusRetry.ts +205 -4
- package/test/unit/spec/interpretation/index.ts +26 -4
- package/test/unit/spec/locus-info/controlsUtils.js +172 -57
- package/test/unit/spec/locus-info/index.js +475 -81
- package/test/unit/spec/meeting/in-meeting-actions.ts +2 -0
- package/test/unit/spec/meeting/index.js +902 -14
- package/test/unit/spec/meeting/muteState.js +3 -0
- package/test/unit/spec/meeting/utils.js +33 -0
- package/test/unit/spec/meetings/index.js +309 -10
- package/test/unit/spec/meetings/request.js +141 -0
- package/test/unit/spec/meetings/utils.js +161 -0
- package/test/unit/spec/member/index.js +7 -0
- package/test/unit/spec/member/util.js +24 -0
- package/test/unit/spec/recording-controller/index.js +9 -8
- package/test/unit/spec/webinar/index.ts +81 -16
package/src/webinar/index.ts
CHANGED
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
|
|
19
19
|
import WebinarCollection from './collection';
|
|
20
20
|
import LoggerProxy from '../common/logs/logger-proxy';
|
|
21
|
+
import MeetingUtil from '../meeting/util';
|
|
21
22
|
import {sanitizeParams} from './utils';
|
|
22
23
|
|
|
23
24
|
/**
|
|
@@ -98,13 +99,49 @@ const Webinar = WebexPlugin.extend({
|
|
|
98
99
|
return {isPromoted, isDemoted};
|
|
99
100
|
},
|
|
100
101
|
|
|
102
|
+
/**
|
|
103
|
+
* Resolves the meeting associated with this webinar instance, guarded against the
|
|
104
|
+
* meetingId pointer drifting onto an unrelated transient meeting (e.g. an inbound
|
|
105
|
+
* 1:1 call) that may exist in the meeting collection. Returns the meeting only when
|
|
106
|
+
* its locusUrl matches this webinar's tracked locusUrl. Returns undefined (with a
|
|
107
|
+
* warning) when the meeting cannot be resolved or when the webinar's locusUrl has
|
|
108
|
+
* not been initialized yet — callers must treat this as "no owned meeting" rather
|
|
109
|
+
* than fall through to an unvalidated lookup.
|
|
110
|
+
* @returns {object|undefined}
|
|
111
|
+
*/
|
|
112
|
+
getValidatedWebinarMeeting() {
|
|
113
|
+
const meeting = this.webex.meetings.getMeetingByType(_ID_, this.meetingId);
|
|
114
|
+
|
|
115
|
+
if (!meeting) {
|
|
116
|
+
return undefined;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
if (!this.locusUrl) {
|
|
120
|
+
LoggerProxy.logger.warn(
|
|
121
|
+
`Webinar:index#getValidatedWebinarMeeting --> skipping; webinar locusUrl is not yet initialized for meetingId ${this.meetingId}`
|
|
122
|
+
);
|
|
123
|
+
|
|
124
|
+
return undefined;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
if (meeting.locusUrl !== this.locusUrl) {
|
|
128
|
+
LoggerProxy.logger.warn(
|
|
129
|
+
`Webinar:index#getValidatedWebinarMeeting --> skipping; meeting ${this.meetingId} locusUrl ${meeting.locusUrl} does not match webinar locusUrl ${this.locusUrl}`
|
|
130
|
+
);
|
|
131
|
+
|
|
132
|
+
return undefined;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
return meeting;
|
|
136
|
+
},
|
|
137
|
+
|
|
101
138
|
/**
|
|
102
139
|
* should join practice session data channel or not
|
|
103
140
|
* @param {Object} {isPromoted: boolean, isDemoted: boolean}} Role transition states
|
|
104
141
|
* @returns {void}
|
|
105
142
|
*/
|
|
106
143
|
updateStatusByRole({isPromoted, isDemoted}) {
|
|
107
|
-
const meeting = this.
|
|
144
|
+
const meeting = this.getValidatedWebinarMeeting();
|
|
108
145
|
|
|
109
146
|
if (
|
|
110
147
|
(isDemoted && meeting?.shareStatus === SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE) ||
|
|
@@ -128,6 +165,9 @@ const Webinar = WebexPlugin.extend({
|
|
|
128
165
|
|
|
129
166
|
/**
|
|
130
167
|
* Disconnects the practice session data channel and removes its relay listener.
|
|
168
|
+
* The listener reference removed here is the exact callback captured at subscribe
|
|
169
|
+
* time (see updatePSDataChannel) so that cleanup is correct even if the underlying
|
|
170
|
+
* meeting can no longer be resolved (e.g. locusUrl mismatch).
|
|
131
171
|
* @returns {Promise<void>}
|
|
132
172
|
*/
|
|
133
173
|
async cleanupPSDataChannel() {
|
|
@@ -137,8 +177,6 @@ const Webinar = WebexPlugin.extend({
|
|
|
137
177
|
this._pendingOnlineListener = null;
|
|
138
178
|
}
|
|
139
179
|
|
|
140
|
-
const meeting = this.webex.meetings.getMeetingByType(_ID_, this.meetingId);
|
|
141
|
-
|
|
142
180
|
// @ts-ignore - Fix type
|
|
143
181
|
await this.webex.internal.llm.disconnectLLM(
|
|
144
182
|
{
|
|
@@ -147,15 +185,21 @@ const Webinar = WebexPlugin.extend({
|
|
|
147
185
|
},
|
|
148
186
|
LLM_PRACTICE_SESSION
|
|
149
187
|
);
|
|
150
|
-
|
|
151
|
-
this.
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
188
|
+
|
|
189
|
+
if (this._practiceSessionRelayListener) {
|
|
190
|
+
// @ts-ignore - Fix type
|
|
191
|
+
this.webex.internal.llm.off(
|
|
192
|
+
`event:relay.event:${LLM_PRACTICE_SESSION}`,
|
|
193
|
+
this._practiceSessionRelayListener
|
|
194
|
+
);
|
|
195
|
+
this._practiceSessionRelayListener = null;
|
|
196
|
+
}
|
|
155
197
|
},
|
|
156
198
|
|
|
157
199
|
/**
|
|
158
200
|
* Ensures practice-session token exists before registering the practice LLM channel.
|
|
201
|
+
* Caller is responsible for passing a meeting that has already been resolved via
|
|
202
|
+
* getValidatedWebinarMeeting() — this method does not re-validate ownership.
|
|
159
203
|
* @param {object} meeting
|
|
160
204
|
* @returns {Promise<string|undefined>}
|
|
161
205
|
*/
|
|
@@ -211,7 +255,7 @@ const Webinar = WebexPlugin.extend({
|
|
|
211
255
|
this._updatePSDataChannelSequence = (this._updatePSDataChannelSequence || 0) + 1;
|
|
212
256
|
const invocationSequence = this._updatePSDataChannelSequence;
|
|
213
257
|
|
|
214
|
-
const meeting = this.
|
|
258
|
+
const meeting = this.getValidatedWebinarMeeting();
|
|
215
259
|
const isPracticeSession = meeting?.isJoined() && this.isJoinPracticeSessionDataChannel();
|
|
216
260
|
|
|
217
261
|
if (!isPracticeSession) {
|
|
@@ -312,15 +356,21 @@ const Webinar = WebexPlugin.extend({
|
|
|
312
356
|
LLM_PRACTICE_SESSION
|
|
313
357
|
)
|
|
314
358
|
.then((registerAndConnectResult) => {
|
|
315
|
-
//
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
359
|
+
// Track the exact listener reference so cleanupPSDataChannel can
|
|
360
|
+
// unsubscribe deterministically, even if the meeting can no longer
|
|
361
|
+
// be resolved at cleanup time.
|
|
362
|
+
if (this._practiceSessionRelayListener) {
|
|
363
|
+
// @ts-ignore - Fix type
|
|
364
|
+
this.webex.internal.llm.off(
|
|
365
|
+
`event:relay.event:${LLM_PRACTICE_SESSION}`,
|
|
366
|
+
this._practiceSessionRelayListener
|
|
367
|
+
);
|
|
368
|
+
}
|
|
369
|
+
this._practiceSessionRelayListener = meeting?.processRelayEvent;
|
|
320
370
|
// @ts-ignore - Fix type
|
|
321
371
|
this.webex.internal.llm.on(
|
|
322
372
|
`event:relay.event:${LLM_PRACTICE_SESSION}`,
|
|
323
|
-
|
|
373
|
+
this._practiceSessionRelayListener
|
|
324
374
|
);
|
|
325
375
|
// @ts-ignore - Fix type
|
|
326
376
|
this.webex.internal.voicea?.announce?.();
|
|
@@ -341,6 +391,8 @@ const Webinar = WebexPlugin.extend({
|
|
|
341
391
|
* @returns {Promise}
|
|
342
392
|
*/
|
|
343
393
|
setPracticeSessionState(enabled) {
|
|
394
|
+
const meeting = this.getValidatedWebinarMeeting();
|
|
395
|
+
|
|
344
396
|
return this.request({
|
|
345
397
|
method: HTTP_VERBS.PATCH,
|
|
346
398
|
uri: `${this.locusUrl}/controls`,
|
|
@@ -349,10 +401,16 @@ const Webinar = WebexPlugin.extend({
|
|
|
349
401
|
enabled,
|
|
350
402
|
},
|
|
351
403
|
},
|
|
352
|
-
})
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
404
|
+
})
|
|
405
|
+
.then((response) => {
|
|
406
|
+
MeetingUtil.updateLocusFromApiResponse(meeting, response);
|
|
407
|
+
|
|
408
|
+
return response;
|
|
409
|
+
})
|
|
410
|
+
.catch((error) => {
|
|
411
|
+
LoggerProxy.logger.error('Meeting:webinar#setPracticeSessionState failed', error);
|
|
412
|
+
throw error;
|
|
413
|
+
});
|
|
356
414
|
},
|
|
357
415
|
|
|
358
416
|
/**
|
|
@@ -532,7 +590,14 @@ const Webinar = WebexPlugin.extend({
|
|
|
532
590
|
* @returns {Promise}
|
|
533
591
|
*/
|
|
534
592
|
async searchLargeScaleWebinarAttendees(payload) {
|
|
535
|
-
const meeting = this.
|
|
593
|
+
const meeting = this.getValidatedWebinarMeeting();
|
|
594
|
+
if (!meeting) {
|
|
595
|
+
LoggerProxy.logger.error(
|
|
596
|
+
'Meeting:webinar5k#searchLargeScaleWebinarAttendees failed --> webinar meeting could not be validated'
|
|
597
|
+
);
|
|
598
|
+
throw new Error('Meeting:webinar5k#Webinar meeting is not resolvable for the current locus');
|
|
599
|
+
}
|
|
600
|
+
|
|
536
601
|
const rawParams = {
|
|
537
602
|
search_text: payload?.queryString,
|
|
538
603
|
limit: payload?.limit ?? DEFAULT_LARGE_SCALE_WEBINAR_ATTENDEE_SEARCH_LIMIT,
|
|
@@ -540,7 +605,9 @@ const Webinar = WebexPlugin.extend({
|
|
|
540
605
|
};
|
|
541
606
|
const attendeeSearchUrl = meeting?.locusInfo?.links?.resources?.attendeeSearch?.url;
|
|
542
607
|
if (!attendeeSearchUrl) {
|
|
543
|
-
LoggerProxy.logger.error(
|
|
608
|
+
LoggerProxy.logger.error(
|
|
609
|
+
'Meeting:webinar5k#searchLargeScaleWebinarAttendees failed --> attendee search url unavailable'
|
|
610
|
+
);
|
|
544
611
|
throw new Error('Meeting:webinar5k#Attendee search url is not available');
|
|
545
612
|
}
|
|
546
613
|
|
|
@@ -55,6 +55,27 @@ describe('plugin-meetings', () => {
|
|
|
55
55
|
});
|
|
56
56
|
});
|
|
57
57
|
|
|
58
|
+
describe('#locusUrlUpdate', () => {
|
|
59
|
+
it('should update the locusUrl property', () => {
|
|
60
|
+
const testLocusUrl = 'https://locus-a.wbx2.com/locus/api/v1/loci/test-id';
|
|
61
|
+
|
|
62
|
+
aiEnableRequest.locusUrlUpdate(testLocusUrl);
|
|
63
|
+
|
|
64
|
+
assert.equal(aiEnableRequest.locusUrl, testLocusUrl);
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
it('should handle updating locusUrl multiple times', () => {
|
|
68
|
+
const firstUrl = 'https://locus-a.wbx2.com/locus/api/v1/loci/test-id-1';
|
|
69
|
+
const secondUrl = 'https://locus-a.wbx2.com/locus/api/v1/loci/test-id-2';
|
|
70
|
+
|
|
71
|
+
aiEnableRequest.locusUrlUpdate(firstUrl);
|
|
72
|
+
assert.equal(aiEnableRequest.locusUrl, firstUrl);
|
|
73
|
+
|
|
74
|
+
aiEnableRequest.locusUrlUpdate(secondUrl);
|
|
75
|
+
assert.equal(aiEnableRequest.locusUrl, secondUrl);
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
|
|
58
79
|
describe('#selfParticipantIdUpdate', () => {
|
|
59
80
|
it('should update the selfParticipantId property', () => {
|
|
60
81
|
const testSelfParticipantId = 'participant-123';
|
|
@@ -254,6 +275,71 @@ describe('plugin-meetings', () => {
|
|
|
254
275
|
sinon.assert.notCalled(triggerSpy);
|
|
255
276
|
});
|
|
256
277
|
|
|
278
|
+
it('should not trigger event when locusUrl does not match', () => {
|
|
279
|
+
const testLocusUrl = 'https://locus-a.wbx2.com/locus/api/v1/loci/test-id';
|
|
280
|
+
const differentLocusUrl = 'https://locus-a.wbx2.com/locus/api/v1/loci/different-id';
|
|
281
|
+
|
|
282
|
+
aiEnableRequest.locusUrl = testLocusUrl;
|
|
283
|
+
|
|
284
|
+
// Reset the spy after setting locusUrl to avoid counting property change events
|
|
285
|
+
triggerSpy.resetHistory();
|
|
286
|
+
|
|
287
|
+
aiEnableRequest.listenToApprovalRequests();
|
|
288
|
+
|
|
289
|
+
const event = {
|
|
290
|
+
data: {
|
|
291
|
+
locusUrl: differentLocusUrl,
|
|
292
|
+
approval: {
|
|
293
|
+
resourceType: AI_ENABLE_REQUEST.RESOURCE_TYPE,
|
|
294
|
+
receivers: [{participantId: testSelfParticipantId}],
|
|
295
|
+
initiator: {participantId: testInitiatorId},
|
|
296
|
+
actionType: AI_ENABLE_REQUEST.ACTION_TYPE.REQUESTED,
|
|
297
|
+
url: testUrl,
|
|
298
|
+
},
|
|
299
|
+
},
|
|
300
|
+
};
|
|
301
|
+
|
|
302
|
+
webex.internal.mercury.emit(`event:${LOCUSEVENT.APPROVAL_REQUEST}`, event);
|
|
303
|
+
|
|
304
|
+
sinon.assert.notCalled(triggerSpy);
|
|
305
|
+
});
|
|
306
|
+
|
|
307
|
+
it('should trigger event when locusUrl matches', () => {
|
|
308
|
+
const testLocusUrl = 'https://locus-a.wbx2.com/locus/api/v1/loci/test-id';
|
|
309
|
+
|
|
310
|
+
aiEnableRequest.locusUrl = testLocusUrl;
|
|
311
|
+
|
|
312
|
+
// Reset the spy after setting locusUrl to avoid counting property change events
|
|
313
|
+
triggerSpy.resetHistory();
|
|
314
|
+
|
|
315
|
+
aiEnableRequest.listenToApprovalRequests();
|
|
316
|
+
|
|
317
|
+
const event = {
|
|
318
|
+
data: {
|
|
319
|
+
locusUrl: testLocusUrl,
|
|
320
|
+
approval: {
|
|
321
|
+
resourceType: AI_ENABLE_REQUEST.RESOURCE_TYPE,
|
|
322
|
+
receivers: [{participantId: testSelfParticipantId}],
|
|
323
|
+
initiator: {participantId: testInitiatorId},
|
|
324
|
+
actionType: AI_ENABLE_REQUEST.ACTION_TYPE.REQUESTED,
|
|
325
|
+
url: testUrl,
|
|
326
|
+
},
|
|
327
|
+
},
|
|
328
|
+
};
|
|
329
|
+
|
|
330
|
+
webex.internal.mercury.emit(`event:${LOCUSEVENT.APPROVAL_REQUEST}`, event);
|
|
331
|
+
|
|
332
|
+
sinon.assert.calledOnce(triggerSpy);
|
|
333
|
+
sinon.assert.calledWith(triggerSpy, AI_ENABLE_REQUEST.EVENTS.APPROVAL_REQUEST_ARRIVED, {
|
|
334
|
+
actionType: AI_ENABLE_REQUEST.ACTION_TYPE.REQUESTED,
|
|
335
|
+
isApprover: true,
|
|
336
|
+
isInitiator: false,
|
|
337
|
+
initiatorId: testInitiatorId,
|
|
338
|
+
approverId: testSelfParticipantId,
|
|
339
|
+
url: testUrl,
|
|
340
|
+
});
|
|
341
|
+
});
|
|
342
|
+
|
|
257
343
|
it('should handle events with different action types', () => {
|
|
258
344
|
aiEnableRequest.listenToApprovalRequests();
|
|
259
345
|
|
|
@@ -26,6 +26,7 @@ describe('plugin-meetings', () => {
|
|
|
26
26
|
breakout.sessionId = 'sessionId';
|
|
27
27
|
breakout.sessionType = 'BREAKOUT';
|
|
28
28
|
breakout.url = 'url';
|
|
29
|
+
breakout.resourceLink = 'resource-link';
|
|
29
30
|
breakout.collection = {
|
|
30
31
|
parent: {
|
|
31
32
|
meetingId: 'activeMeetingId',
|
|
@@ -45,6 +46,7 @@ describe('plugin-meetings', () => {
|
|
|
45
46
|
describe('initialize', () => {
|
|
46
47
|
it('creates the object correctly', () => {
|
|
47
48
|
assert.instanceOf(breakout.breakoutRequest, BreakoutRequest);
|
|
49
|
+
assert.equal(breakout.resourceLink, 'resource-link');
|
|
48
50
|
});
|
|
49
51
|
});
|
|
50
52
|
|
|
@@ -217,10 +219,14 @@ describe('plugin-meetings', () => {
|
|
|
217
219
|
locusParticipantsUpdate: sinon.stub(),
|
|
218
220
|
};
|
|
219
221
|
|
|
220
|
-
const locusData = {
|
|
222
|
+
const locusData = {participants: [{id: 'participant-1'}], sequence: {entries: [123]}};
|
|
221
223
|
const result = breakout.parseRoster(locusData);
|
|
222
224
|
|
|
223
|
-
assert.calledOnceWithExactly(breakout.members.locusParticipantsUpdate,
|
|
225
|
+
assert.calledOnceWithExactly(breakout.members.locusParticipantsUpdate, {
|
|
226
|
+
participants: [{id: 'participant-1'}],
|
|
227
|
+
isReplace: true,
|
|
228
|
+
});
|
|
229
|
+
assert.equal(breakout.breakoutRosterLocus, locusData);
|
|
224
230
|
assert.equal(result, undefined);
|
|
225
231
|
});
|
|
226
232
|
it('not call locusParticipantsUpdate if sequence is expired', () => {
|
|
@@ -228,7 +234,7 @@ describe('plugin-meetings', () => {
|
|
|
228
234
|
locusParticipantsUpdate: sinon.stub(),
|
|
229
235
|
};
|
|
230
236
|
breakout.isNeedHandleRoster = sinon.stub().returns(false);
|
|
231
|
-
const locusData = {
|
|
237
|
+
const locusData = {participants: [{id: 'participant-1'}], sequence: {entries: [123]}};
|
|
232
238
|
breakout.parseRoster(locusData);
|
|
233
239
|
|
|
234
240
|
assert.notCalled(breakout.members.locusParticipantsUpdate);
|
|
@@ -313,6 +313,7 @@ describe('plugin-meetings', () => {
|
|
|
313
313
|
groupId: 'groupId',
|
|
314
314
|
sessionType: 'sessionType',
|
|
315
315
|
url: 'url',
|
|
316
|
+
resourceLink: 'resource-link',
|
|
316
317
|
name: 'name',
|
|
317
318
|
allowBackToMain: true,
|
|
318
319
|
delayCloseTime: 10,
|
|
@@ -339,6 +340,7 @@ describe('plugin-meetings', () => {
|
|
|
339
340
|
assert.equal(breakouts.currentBreakoutSession.current, true);
|
|
340
341
|
assert.equal(breakouts.currentBreakoutSession.sessionType, 'sessionType');
|
|
341
342
|
assert.equal(breakouts.currentBreakoutSession.url, 'url');
|
|
343
|
+
assert.equal(breakouts.currentBreakoutSession.resourceLink, 'resource-link');
|
|
342
344
|
assert.equal(breakouts.currentBreakoutSession.active, false);
|
|
343
345
|
assert.equal(breakouts.currentBreakoutSession.allowed, false);
|
|
344
346
|
assert.equal(breakouts.currentBreakoutSession.assigned, false);
|