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,6 +103,7 @@ export default [
103 103
     'enableTcc',
104 104
     'etherpad_base',
105 105
     'failICE',
106
+    'feedbackPercentage',
106 107
     'fileRecordingsEnabled',
107 108
     'firefox_fake_device',
108 109
     'forceJVB121Ratio',

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

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

Notiek ielāde…
Atcelt
Saglabāt