From a034daaf0b56d12f46126e30d7d6b4742080a33f Mon Sep 17 00:00:00 2001 From: Ravi Chandra Sekhar Sarika Date: Fri, 20 Dec 2024 15:35:20 +0530 Subject: [PATCH] fix: end meeting for all type issue --- .../@webex/plugin-meetings/src/meetings/index.ts | 6 ++++++ .../test/unit/spec/meetings/index.js | 14 +++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/packages/@webex/plugin-meetings/src/meetings/index.ts b/packages/@webex/plugin-meetings/src/meetings/index.ts index dd0ade33a9f..e93b79bff93 100644 --- a/packages/@webex/plugin-meetings/src/meetings/index.ts +++ b/packages/@webex/plugin-meetings/src/meetings/index.ts @@ -155,6 +155,9 @@ export type BasicMeetingInformation = { }; meetingInfo: any; sessionCorrelationId: string; + roles: string[]; + getCurUserType: () => string | null; + callStateForMetrics: CallStateForMetrics; }; /** @@ -1143,6 +1146,9 @@ export default class Meetings extends WebexPlugin { sessionId: meeting.locusInfo?.fullState?.sessionId, }, }, + roles: meeting.roles, + callStateForMetrics: meeting.callStateForMetrics, + getCurUserType: meeting.getCurUserType, }); this.meetingCollection.delete(meeting.id); Trigger.trigger( diff --git a/packages/@webex/plugin-meetings/test/unit/spec/meetings/index.js b/packages/@webex/plugin-meetings/test/unit/spec/meetings/index.js index 545a05fbd97..770605819be 100644 --- a/packages/@webex/plugin-meetings/test/unit/spec/meetings/index.js +++ b/packages/@webex/plugin-meetings/test/unit/spec/meetings/index.js @@ -131,9 +131,9 @@ describe('plugin-meetings', () => { logger, people: { _getMe: sinon.stub().resolves({ - type: 'validuser', + type: 'validuser', }), - } + }, }); startReachabilityStub = sinon.stub(webex.meetings, 'startReachability').resolves(); @@ -1985,6 +1985,8 @@ describe('plugin-meetings', () => { const meetingIds = { meetingId: meeting.id, correlationId: meeting.correlationId, + roles: meeting.roles, + callStateForMetrics: meeting.callStateForMetrics, }; webex.meetings.destroy(meeting, test1); @@ -2021,6 +2023,8 @@ describe('plugin-meetings', () => { assert.equal(deletedMeetingInfo.id, meetingIds.meetingId); assert.equal(deletedMeetingInfo.correlationId, meetingIds.correlationId); + assert.equal(deletedMeetingInfo.roles, meetingIds.roles); + assert.equal(deletedMeetingInfo.callStateForMetrics, meetingIds.callStateForMetrics); }); }); @@ -2092,7 +2096,7 @@ describe('plugin-meetings', () => { ); }); - const setup = ({me = { type: 'validuser'}, user} = {}) => { + const setup = ({me = {type: 'validuser'}, user} = {}) => { loggerProxySpy = sinon.spy(LoggerProxy.logger, 'error'); assert.deepEqual(webex.internal.services._getCatalog().getAllowedDomains(), []); @@ -2113,9 +2117,9 @@ describe('plugin-meetings', () => { it('should not call request.getMeetingPreferences if user is a guest', async () => { setup({me: {type: 'appuser'}}); - + await webex.meetings.fetchUserPreferredWebexSite(); - + assert.equal(webex.meetings.preferredWebexSite, ''); assert.deepEqual(webex.internal.services._getCatalog().getAllowedDomains(), []); assert.notCalled(webex.internal.services.getMeetingPreferences);