Skip to content

Commit

Permalink
fix(meeting): fix intermittently leaving meeting before even joining …
Browse files Browse the repository at this point in the history
…- SPARK-379330
  • Loading branch information
rajeshtezu authored and rarajes2 committed Sep 26, 2023
1 parent eb841f0 commit ed26b66
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
5 changes: 3 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,10 @@ jobs:
integration-test:
executor: node-fermium-executor
steps:
- browser-tools/install-chrome
- checkout_from_workspace # https://discuss.circleci.com/t/cannot-checkout-anymore/46671
- browser-tools/install-chrome:
chrome-version: "114.0.5735.90" # https://github.com/CircleCI-Public/browser-tools-orb/issues/75
- browser-tools/install-chromedriver
- checkout_from_workspace
- restore_cache:
keys:
- dependency-cache-{{ checksum "package-lock.json" }}
Expand Down
13 changes: 3 additions & 10 deletions src/MeetingsSDKAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,6 @@ const LAYOUT_TYPES_MAP = {
Focus: 'Single',
};

const SDK_MEMBER_STATUS_TO_ADAPTER_MEETING_STATE = {
IN_LOBBY: MeetingState.LOBBY,
IN_MEETING: MeetingState.JOINED,
NOT_IN_MEETING: MeetingState.LEFT,
};

const ON_IOS_15_1 = typeof navigator !== 'undefined'
&& navigator.userAgent.includes('iPhone OS 15_1');

Expand Down Expand Up @@ -1276,12 +1270,11 @@ export default class MeetingsSDKAdapter extends MeetingsAdapter {

const meetingStateChange$ = fromEvent(sdkMeeting && sdkMeeting.members, EVENT_MEMBERS_UPDATE)
.pipe(
map((event) => {
map(() => {
logger.debug('MEETING', ID, 'getMeeting()', ['received', EVENT_MEMBERS_UPDATE, 'event']);
const self = Object.values(event.full).find((m) => m.isSelf);
const self = sdkMeeting.joinedWith;

return SDK_MEMBER_STATUS_TO_ADAPTER_MEETING_STATE[self && self.status]
|| MeetingState.NOT_JOINED;
return (self && self.state) || MeetingState.NOT_JOINED;
}),
distinctUntilChanged(),
tap((state) => {
Expand Down

0 comments on commit ed26b66

Please sign in to comment.