Skip to content

Commit

Permalink
fix: end meeting for all getCurUserType type issue (#4038)
Browse files Browse the repository at this point in the history
  • Loading branch information
rsarika authored Dec 20, 2024
1 parent 42bd008 commit 31f2bf3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
6 changes: 6 additions & 0 deletions packages/@webex/plugin-meetings/src/meetings/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ export type BasicMeetingInformation = {
};
meetingInfo: any;
sessionCorrelationId: string;
roles: string[];
getCurUserType: () => string | null;
callStateForMetrics: CallStateForMetrics;
};

/**
Expand Down Expand Up @@ -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(
Expand Down
14 changes: 9 additions & 5 deletions packages/@webex/plugin-meetings/test/unit/spec/meetings/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ describe('plugin-meetings', () => {
logger,
people: {
_getMe: sinon.stub().resolves({
type: 'validuser',
type: 'validuser',
}),
}
},
});

startReachabilityStub = sinon.stub(webex.meetings, 'startReachability').resolves();
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
});
});

Expand Down Expand Up @@ -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(), []);

Expand All @@ -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);
Expand Down

0 comments on commit 31f2bf3

Please sign in to comment.