diff --git a/react/features/notifications/components/web/NotificationsContainer.js b/react/features/notifications/components/web/NotificationsContainer.js index 822cca3dd..9649f9856 100644 --- a/react/features/notifications/components/web/NotificationsContainer.js +++ b/react/features/notifications/components/web/NotificationsContainer.js @@ -6,12 +6,20 @@ import React from 'react'; import { connect } from '../../../base/redux'; import AbstractNotificationsContainer, { - _abstractMapStateToProps as _mapStateToProps, - type Props + _abstractMapStateToProps, + type Props as AbstractProps } from '../AbstractNotificationsContainer'; import Notification from './Notification'; +type Props = AbstractProps & { + + /** + * Whther we are a SIP gateway or not. + */ + _iAmSipGateway: boolean +}; + /** * Implements a React {@link Component} which displays notifications and handles * automatic dismissmal after a notification is shown for a defined timeout @@ -28,6 +36,10 @@ class NotificationsContainer extends AbstractNotificationsContainer { * @returns {ReactElement} */ render() { + if (this.props._iAmSipGateway) { + return null; + } + return ( { this._renderFlags() } @@ -65,4 +77,21 @@ class NotificationsContainer extends AbstractNotificationsContainer { } } +/** + * Maps (parts of) the Redux state to the associated props for this component. + * + * @param {Object} state - The Redux state. + * @private + * @returns {Props} + */ +function _mapStateToProps(state) { + const { iAmSipGateway } = state['features/base/config']; + + return { + ..._abstractMapStateToProps(state), + _iAmSipGateway: Boolean(iAmSipGateway) + }; +} + + export default connect(_mapStateToProps)(NotificationsContainer);