allow setting the feedback percentage

This commit is contained in:
Bettenbuk Zoltan 2020-02-12 10:20:59 +01:00 committed by Zoltan Bettenbuk
parent 9bb789472e
commit bbca0fc357
2 changed files with 3 additions and 1 deletions

View File

@ -103,6 +103,7 @@ export default [
'enableTcc',
'etherpad_base',
'failICE',
'feedbackPercentage',
'fileRecordingsEnabled',
'firefox_fake_device',
'forceJVB121Ratio',

View File

@ -54,6 +54,7 @@ export function maybeOpenFeedbackDialog(conference: Object) {
return (dispatch: Dispatch<any>, getState: Function): Promise<R> => {
const state = getState();
const { feedbackPercentage = 100 } = state['features/base/config'];
if (interfaceConfig.filmStripOnly || config.iAmRecorder) {
// Intentionally fall through the if chain to prevent further action
@ -69,7 +70,7 @@ export function maybeOpenFeedbackDialog(conference: Object) {
feedbackSubmitted: true,
showThankYou: true
});
} else if (conference.isCallstatsEnabled()) {
} else if (conference.isCallstatsEnabled() && feedbackPercentage > Math.random() * 100) {
return new Promise(resolve => {
dispatch(openFeedbackDialog(conference, () => {
const { submitted } = getState()['features/feedback'];