Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions apps/meteor/client/hooks/useVoipWarningModal.tsx

This file was deleted.

19 changes: 1 addition & 18 deletions apps/meteor/client/providers/MediaCallProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@ import type { ReactNode } from 'react';
import { useMemo } from 'react';

import { useHasLicenseModule } from '../hooks/useHasLicenseModule';
import { useVoipWarningModal } from '../hooks/useVoipWarningModal';

const MediaCallProvider = ({ children }: { children: ReactNode }) => {
const dispatchWarning = useVoipWarningModal();

const canMakeInternalCall = usePermission('allow-internal-voice-calls');
const canMakeExternalCall = usePermission('allow-external-voice-calls');

Expand All @@ -24,21 +21,7 @@ const MediaCallProvider = ({ children }: { children: ReactNode }) => {
[],
);

const unlicensedContextValue = useMemo(
() => ({
state: 'unlicensed' as const,
onToggleWidget: dispatchWarning,
onEndCall: undefined,
peerInfo: undefined,
}),
[dispatchWarning],
);

if (!hasModule) {
return <MediaCallContext.Provider value={unlicensedContextValue}>{children}</MediaCallContext.Provider>;
}

if (!canMakeInternalCall && !canMakeExternalCall) {
if (!hasModule || (!canMakeInternalCall && !canMakeExternalCall)) {
return <MediaCallContext.Provider value={unauthorizedContextValue}>{children}</MediaCallContext.Provider>;
}

Expand Down
114 changes: 0 additions & 114 deletions apps/meteor/client/views/room/contextualBar/TeamsVoipConfigModal.tsx

This file was deleted.

58 changes: 0 additions & 58 deletions apps/meteor/tests/e2e/voice-calls-ce.spec.ts

This file was deleted.

Loading