diff --git a/webapp/channels/src/components/user_settings/notifications/desktop_notification_setting/desktop_notification_settings.test.tsx b/webapp/channels/src/components/user_settings/notifications/desktop_notification_setting/desktop_notification_settings.test.tsx
index 1ca12d33f4..cb9eb24b24 100644
--- a/webapp/channels/src/components/user_settings/notifications/desktop_notification_setting/desktop_notification_settings.test.tsx
+++ b/webapp/channels/src/components/user_settings/notifications/desktop_notification_setting/desktop_notification_settings.test.tsx
@@ -33,7 +33,7 @@ describe('components/user_settings/notifications/DesktopNotificationSettings', (
threads: NotificationLevels.ALL,
callsSelectedSound: 'Dynamic',
callsSound: 'false',
- isCallsEnabled: false,
+ isCallsRingingEnabled: false,
};
test('should match snapshot, on max setting', () => {
@@ -54,7 +54,7 @@ describe('components/user_settings/notifications/DesktopNotificationSettings', (
});
test('should match snapshot, on max setting with Calls enabled', () => {
- const props = {...baseProps, isCallsEnabled: true};
+ const props = {...baseProps, isCallsRingingEnabled: true};
const wrapper = shallow(
,
);
@@ -63,7 +63,7 @@ describe('components/user_settings/notifications/DesktopNotificationSettings', (
});
test('should match snapshot, on max setting with Calls enabled, calls sound true', () => {
- const props = {...baseProps, isCallsEnabled: true, callsSound: 'true'};
+ const props = {...baseProps, isCallsRingingEnabled: true, callsSound: 'true'};
const wrapper = shallow(
,
);
diff --git a/webapp/channels/src/components/user_settings/notifications/desktop_notification_setting/desktop_notification_settings.tsx b/webapp/channels/src/components/user_settings/notifications/desktop_notification_setting/desktop_notification_settings.tsx
index 248dd27ec3..7dcaa9e31f 100644
--- a/webapp/channels/src/components/user_settings/notifications/desktop_notification_setting/desktop_notification_settings.tsx
+++ b/webapp/channels/src/components/user_settings/notifications/desktop_notification_setting/desktop_notification_settings.tsx
@@ -35,7 +35,7 @@ type Props = {
selectedSound: string;
callsSelectedSound: string;
isCollapsedThreadsEnabled: boolean;
- isCallsEnabled: boolean;
+ isCallsRingingEnabled: boolean;
};
type State = {
@@ -164,7 +164,7 @@ export default class DesktopNotificationSettings extends React.PureComponent);
}
- if (this.props.isCallsEnabled) {
+ if (this.props.isCallsRingingEnabled) {
const callsSoundRadio = [false, false];
if (this.props.callsSound === 'false') {
callsSoundRadio[1] = true;
diff --git a/webapp/channels/src/components/user_settings/notifications/index.ts b/webapp/channels/src/components/user_settings/notifications/index.ts
index f03f00059b..6464a747a4 100644
--- a/webapp/channels/src/components/user_settings/notifications/index.ts
+++ b/webapp/channels/src/components/user_settings/notifications/index.ts
@@ -12,7 +12,7 @@ import {ActionFunc} from 'mattermost-redux/types/actions';
import {GlobalState} from 'types/store';
import UserSettingsNotifications, {Props} from './user_settings_notifications';
-import {isCallsEnabled} from 'selectors/calls';
+import {isCallsEnabled, isCallsRingingEnabled} from 'selectors/calls';
function mapStateToProps(state: GlobalState) {
const config = getConfig(state);
@@ -24,7 +24,7 @@ function mapStateToProps(state: GlobalState) {
sendPushNotifications,
enableAutoResponder,
isCollapsedThreadsEnabled: isCollapsedThreadsEnabled(state),
- isCallsEnabled: isCallsEnabled(state, '0.17.0'),
+ isCallsRingingEnabled: isCallsEnabled(state, '0.17.0') && isCallsRingingEnabled(state),
};
}
diff --git a/webapp/channels/src/components/user_settings/notifications/user_settings_notifications.test.tsx b/webapp/channels/src/components/user_settings/notifications/user_settings_notifications.test.tsx
index 5307a4b2d8..1d51873f8f 100644
--- a/webapp/channels/src/components/user_settings/notifications/user_settings_notifications.test.tsx
+++ b/webapp/channels/src/components/user_settings/notifications/user_settings_notifications.test.tsx
@@ -27,7 +27,7 @@ describe('components/user_settings/display/UserSettingsDisplay', () => {
isCollapsedThreadsEnabled: false,
sendPushNotifications: false,
enableAutoResponder: false,
- isCallsEnabled: true,
+ isCallsRingingEnabled: true,
};
test('should have called handleSubmit', async () => {
diff --git a/webapp/channels/src/components/user_settings/notifications/user_settings_notifications.tsx b/webapp/channels/src/components/user_settings/notifications/user_settings_notifications.tsx
index 22a548f224..2e27d2b7b7 100644
--- a/webapp/channels/src/components/user_settings/notifications/user_settings_notifications.tsx
+++ b/webapp/channels/src/components/user_settings/notifications/user_settings_notifications.tsx
@@ -36,7 +36,7 @@ export type Props = {
updateMe: (user: UserProfile) => Promise;
};
isCollapsedThreadsEnabled: boolean;
- isCallsEnabled: boolean;
+ isCallsRingingEnabled: boolean;
}
type State = {
@@ -1058,7 +1058,7 @@ export default class NotificationsTab extends React.PureComponent
callsSelectedSound={this.state.callsNotificationSound || 'default'}
isCollapsedThreadsEnabled={this.props.isCollapsedThreadsEnabled}
areAllSectionsInactive={this.props.activeSection === ''}
- isCallsEnabled={this.props.isCallsEnabled}
+ isCallsRingingEnabled={this.props.isCallsRingingEnabled}
/>