Browse Source

feat(external API): add feedbackPromptDisplayed event

Adds a new event fired when Jitsi Meet shows the feedback prompt.
j8
paweldomas 6 years ago
parent
commit
4312512d2f

+ 10
- 0
modules/API/API.js View File

@@ -541,6 +541,16 @@ class API {
541 541
         this._sendEvent({ name: 'feedback-submitted' });
542 542
     }
543 543
 
544
+    /**
545
+     * Notify external application (if API is enabled) that the feedback prompt
546
+     * has been displayed.
547
+     *
548
+     * @returns {void}
549
+     */
550
+    notifyFeedbackPromptDisplayed() {
551
+        this._sendEvent({ name: 'feedback-prompt-displayed' });
552
+    }
553
+
544 554
     /**
545 555
      * Notify external application (if API is enabled) that the screen sharing
546 556
      * has been turned on/off.

+ 1
- 0
modules/API/external/external_api.js View File

@@ -43,6 +43,7 @@ const events = {
43 43
     'display-name-change': 'displayNameChange',
44 44
     'email-change': 'emailChange',
45 45
     'feedback-submitted': 'feedbackSubmitted',
46
+    'feedback-prompt-displayed': 'feedbackPromptDisplayed',
46 47
     'incoming-message': 'incomingMessage',
47 48
     'outgoing-message': 'outgoingMessage',
48 49
     'participant-joined': 'participantJoined',

+ 4
- 0
react/features/feedback/components/FeedbackDialog.web.js View File

@@ -15,6 +15,7 @@ import { translate } from '../../base/i18n';
15 15
 
16 16
 import { cancelFeedback, submitFeedback } from '../actions';
17 17
 
18
+declare var APP: Object;
18 19
 declare var interfaceConfig: Object;
19 20
 
20 21
 const scoreAnimationClass
@@ -172,6 +173,9 @@ class FeedbackDialog extends Component<Props, State> {
172 173
      */
173 174
     componentDidMount() {
174 175
         sendAnalytics(createFeedbackOpenEvent());
176
+        if (typeof APP !== 'undefined') {
177
+            APP.API.notifyFeedbackPromptDisplayed();
178
+        }
175 179
     }
176 180
 
177 181
     /**

Loading…
Cancel
Save