aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorSaúl Ibarra Corretgé <s@saghul.net>2023-08-16 13:43:37 +0200
committerSaúl Ibarra Corretgé <s@saghul.net>2023-08-16 15:18:02 +0200
commitb12e9edec9d7a52fb40c6017729f8a2f94b00cea (patch)
tree3654dee7c0d09ec0d55d919663c1873eee7f5140 /app
parent59ea8d596688afeafe98a0eed9f22f652aa4a8b6 (diff)
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.
Diffstat (limited to 'app')
-rw-r--r--app/features/conference/components/Conference.js15
1 files changed, 15 insertions, 0 deletions
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
@@ -150,6 +150,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()}.
*
* @returns {ReactElement}