feat(external API): add feedbackPromptDisplayed event

Adds a new event fired when Jitsi Meet shows the feedback prompt.
This commit is contained in:
paweldomas 2019-02-19 16:18:49 -06:00 committed by Paweł Domas
parent b7b2745dae
commit 4312512d2f
3 changed files with 15 additions and 0 deletions

View File

@ -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.

View File

@ -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',

View File

@ -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();
}
}
/**