Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
fix(external-api) extend buttonsWithNotifyClick effect to participants pane invite button (#13660)
Mihaela Dumitruef3f20830ddd
diff --git a/react/features/participants-pane/components/web/InviteButton.tsx b/react/features/participants-pane/components/web/InviteButton.tsxindex c353f0327b..438cb5cd49 100644--- a/react/features/participants-pane/components/web/InviteButton.tsx+++ b/react/features/participants-pane/components/web/InviteButton.tsx@@ -1,22 +1,41 @@import React, { useCallback } from 'react';import { useTranslation } from 'react-i18next';-import { useDispatch } from 'react-redux';+import { useDispatch, useSelector } from 'react-redux';import { createToolbarEvent } from '../../../analytics/AnalyticsEvents';import { sendAnalytics } from '../../../analytics/functions';+import { IReduxState } from '../../../app/types';+import { getButtonNotifyMode, getButtonsWithNotifyClick } from '../../../base/config/functions.web';import { IconAddUser } from '../../../base/icons/svg';import Button from '../../../base/ui/components/web/Button';import { BUTTON_TYPES } from '../../../base/ui/constants.web';import { beginAddPeople } from '../../../invite/actions';+import { NOTIFY_CLICK_MODE } from '../../../toolbox/constants';++const INVITE_BUTTON_KEY = 'invite';export const InviteButton = () => {const dispatch = useDispatch();const { t } = useTranslation();+ const notifyMode = useSelector((state: IReduxState) => getButtonNotifyMode(+ INVITE_BUTTON_KEY,+ getButtonsWithNotifyClick(state)+ ));const onInvite = useCallback(() => {- sendAnalytics(createToolbarEvent('invite'));+ if (notifyMode) {+ APP.API.notifyToolbarButtonClicked(+ INVITE_BUTTON_KEY, notifyMode === NOTIFY_CLICK_MODE.PREVENT_AND_NOTIFY+ );+ }++ if (notifyMode === NOTIFY_CLICK_MODE.PREVENT_AND_NOTIFY) {+ return;+ }++ sendAnalytics(createToolbarEvent(INVITE_BUTTON_KEY));dispatch(beginAddPeople());- }, [ dispatch ]);+ }, [ dispatch, notifyMode ]);return (<Button