From b12e9edec9d7a52fb40c6017729f8a2f94b00cea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Wed, 16 Aug 2023 13:43:37 +0200 Subject: fix(conference) handle joining another meeting while in one 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. --- app/features/conference/components/Conference.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/app/features/conference/components/Conference.js b/app/features/conference/components/Conference.js index 9720b73..f10a7c2 100644 --- a/app/features/conference/components/Conference.js +++ b/app/features/conference/components/Conference.js @@ -149,6 +149,21 @@ class Conference extends Component { } } + /** + * 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()}. * -- cgit v1.2.3