diff --git a/react/features/prejoin/functions.js b/react/features/prejoin/functions.js index 001f30d52..93d37cf41 100644 --- a/react/features/prejoin/functions.js +++ b/react/features/prejoin/functions.js @@ -160,8 +160,11 @@ export function isPrejoinPageVisible(state: Object): boolean { * @returns {boolean} */ export function shouldAutoKnock(state: Object): boolean { - const { iAmRecorder, iAmSipGateway, autoKnockLobby } = state['features/base/config']; + const { iAmRecorder, iAmSipGateway, autoKnockLobby, prejoinConfig } = state['features/base/config']; + const { userSelectedSkipPrejoin } = state['features/base/settings']; + const isPrejoinEnabled = prejoinConfig?.enabled; - return (isPrejoinPageVisible(state) || autoKnockLobby || (iAmRecorder && iAmSipGateway)) + return ((isPrejoinEnabled && !userSelectedSkipPrejoin) + || autoKnockLobby || (iAmRecorder && iAmSipGateway)) && !state['features/lobby'].knocking; }