Pārlūkot izejas kodu

allow setting the feedback percentage

master
Bettenbuk Zoltan 5 gadus atpakaļ
vecāks
revīzija
bbca0fc357

+ 1
- 0
react/features/base/config/configWhitelist.js Parādīt failu

103
     'enableTcc',
103
     'enableTcc',
104
     'etherpad_base',
104
     'etherpad_base',
105
     'failICE',
105
     'failICE',
106
+    'feedbackPercentage',
106
     'fileRecordingsEnabled',
107
     'fileRecordingsEnabled',
107
     'firefox_fake_device',
108
     'firefox_fake_device',
108
     'forceJVB121Ratio',
109
     'forceJVB121Ratio',

+ 2
- 1
react/features/feedback/actions.js Parādīt failu

54
 
54
 
55
     return (dispatch: Dispatch<any>, getState: Function): Promise<R> => {
55
     return (dispatch: Dispatch<any>, getState: Function): Promise<R> => {
56
         const state = getState();
56
         const state = getState();
57
+        const { feedbackPercentage = 100 } = state['features/base/config'];
57
 
58
 
58
         if (interfaceConfig.filmStripOnly || config.iAmRecorder) {
59
         if (interfaceConfig.filmStripOnly || config.iAmRecorder) {
59
             // Intentionally fall through the if chain to prevent further action
60
             // Intentionally fall through the if chain to prevent further action
69
                 feedbackSubmitted: true,
70
                 feedbackSubmitted: true,
70
                 showThankYou: true
71
                 showThankYou: true
71
             });
72
             });
72
-        } else if (conference.isCallstatsEnabled()) {
73
+        } else if (conference.isCallstatsEnabled() && feedbackPercentage > Math.random() * 100) {
73
             return new Promise(resolve => {
74
             return new Promise(resolve => {
74
                 dispatch(openFeedbackDialog(conference, () => {
75
                 dispatch(openFeedbackDialog(conference, () => {
75
                     const { submitted } = getState()['features/feedback'];
76
                     const { submitted } = getState()['features/feedback'];

Notiek ielāde…
Atcelt
Saglabāt