mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
Introduces a comprehensive disableChat config option that disables the entire chat feature including button visibility, notifications, sounds, private messages, and keyboard shortcuts. When disabled, the chat tab is hidden from the chat panel while allowing other tabs (polls, files, CC) to remain accessible.
24 lines
515 B
TypeScript
24 lines
515 B
TypeScript
import { useSelector } from 'react-redux';
|
|
|
|
import ChatButton from './components/web/ChatButton';
|
|
import { isChatDisabled } from './functions';
|
|
|
|
const chat = {
|
|
key: 'chat',
|
|
Content: ChatButton,
|
|
group: 2
|
|
};
|
|
|
|
/**
|
|
* A hook that returns the chat button if chat is not disabled.
|
|
*
|
|
* @returns {Object | undefined} - The chat button object or undefined.
|
|
*/
|
|
export function useChatButton() {
|
|
const _isChatDisabled = useSelector(isChatDisabled);
|
|
|
|
if (!_isChatDisabled) {
|
|
return chat;
|
|
}
|
|
}
|