Skip to content

Commit

Permalink
fix(conference) handle joining another meeting while in one
Browse files Browse the repository at this point in the history
This can happen when "token auth URL" mode is used since the app will be
redirected to the same meeting it's in, but with a token.
  • Loading branch information
saghul committed Aug 16, 2023
1 parent 59ea8d5 commit b12e9ed
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions app/features/conference/components/Conference.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,21 @@ class Conference extends Component<Props, State> {
}
}

/**
* Handle joining another another meeing while in one.
*
* @param {Object} prevProps - The previous props.
* @returns {void}
*/
componentDidUpdate(prevProps) {
if (prevProps.location.key !== this.props.location.key) {

// Simulate a re-mount so the new meeting is joined.
this.componentWillUnmount();
this.componentDidMount();
}
}

/**
* Implements React's {@link Component#render()}.
*
Expand Down

0 comments on commit b12e9ed

Please sign in to comment.