allow setting the feedback percentage
This commit is contained in:
parent
9bb789472e
commit
bbca0fc357
|
@ -103,6 +103,7 @@ export default [
|
||||||
'enableTcc',
|
'enableTcc',
|
||||||
'etherpad_base',
|
'etherpad_base',
|
||||||
'failICE',
|
'failICE',
|
||||||
|
'feedbackPercentage',
|
||||||
'fileRecordingsEnabled',
|
'fileRecordingsEnabled',
|
||||||
'firefox_fake_device',
|
'firefox_fake_device',
|
||||||
'forceJVB121Ratio',
|
'forceJVB121Ratio',
|
||||||
|
|
|
@ -54,6 +54,7 @@ export function maybeOpenFeedbackDialog(conference: Object) {
|
||||||
|
|
||||||
return (dispatch: Dispatch<any>, getState: Function): Promise<R> => {
|
return (dispatch: Dispatch<any>, getState: Function): Promise<R> => {
|
||||||
const state = getState();
|
const state = getState();
|
||||||
|
const { feedbackPercentage = 100 } = state['features/base/config'];
|
||||||
|
|
||||||
if (interfaceConfig.filmStripOnly || config.iAmRecorder) {
|
if (interfaceConfig.filmStripOnly || config.iAmRecorder) {
|
||||||
// Intentionally fall through the if chain to prevent further action
|
// Intentionally fall through the if chain to prevent further action
|
||||||
|
@ -69,7 +70,7 @@ export function maybeOpenFeedbackDialog(conference: Object) {
|
||||||
feedbackSubmitted: true,
|
feedbackSubmitted: true,
|
||||||
showThankYou: true
|
showThankYou: true
|
||||||
});
|
});
|
||||||
} else if (conference.isCallstatsEnabled()) {
|
} else if (conference.isCallstatsEnabled() && feedbackPercentage > Math.random() * 100) {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
dispatch(openFeedbackDialog(conference, () => {
|
dispatch(openFeedbackDialog(conference, () => {
|
||||||
const { submitted } = getState()['features/feedback'];
|
const { submitted } = getState()['features/feedback'];
|
||||||
|
|
Loading…
Reference in New Issue