Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

feat(external API): add feedbackPromptDisplayed event

paweldomas4312512d2ff7
diff --git a/modules/API/API.js b/modules/API/API.js
index 51a60b74c2..773813d58f 100644
--- a/modules/API/API.js
+++ b/modules/API/API.js
@@ -541,6 +541,16 @@ class API {
this._sendEvent({ name: 'feedback-submitted' });
}
+ /**
+ * Notify external application (if API is enabled) that the feedback prompt
+ * has been displayed.
+ *
+ * @returns {void}
+ */
+ notifyFeedbackPromptDisplayed() {
+ this._sendEvent({ name: 'feedback-prompt-displayed' });
+ }
+
/**
* Notify external application (if API is enabled) that the screen sharing
* has been turned on/off.
diff --git a/modules/API/external/external_api.js b/modules/API/external/external_api.js
index 8d1dbb481f..68088e1df0 100644
--- a/modules/API/external/external_api.js
+++ b/modules/API/external/external_api.js
@@ -43,6 +43,7 @@ const events = {
'display-name-change': 'displayNameChange',
'email-change': 'emailChange',
'feedback-submitted': 'feedbackSubmitted',
+ 'feedback-prompt-displayed': 'feedbackPromptDisplayed',
'incoming-message': 'incomingMessage',
'outgoing-message': 'outgoingMessage',
'participant-joined': 'participantJoined',
diff --git a/react/features/feedback/components/FeedbackDialog.web.js b/react/features/feedback/components/FeedbackDialog.web.js
index 6cca2ff52a..d9bbcd5e16 100644
--- a/react/features/feedback/components/FeedbackDialog.web.js
+++ b/react/features/feedback/components/FeedbackDialog.web.js
@@ -15,6 +15,7 @@ import { translate } from '../../base/i18n';
import { cancelFeedback, submitFeedback } from '../actions';
+declare var APP: Object;
declare var interfaceConfig: Object;
const scoreAnimationClass
@@ -172,6 +173,9 @@ class FeedbackDialog extends Component<Props, State> {
*/
componentDidMount() {
sendAnalytics(createFeedbackOpenEvent());
+ if (typeof APP !== 'undefined') {
+ APP.API.notifyFeedbackPromptDisplayed();
+ }
}
/**