feat(prejoin/web): updated shouldAutoKnock helper (#11725)
* feat(prejoin) updated shouldAutoKnock helper
This commit is contained in:
parent
8f1fae79e4
commit
4b4caf5b1c
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue