The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/client/startup/contextualBar/exportMessages.ts

18 lines
643 B

import { useMemo, lazy, LazyExoticComponent, FC } from 'react';
import { addAction } from '../../views/room/lib/Toolbox';
import { usePermission } from '../../contexts/AuthorizationContext';
addAction('export-messages', ({ room }) => {
const hasPermission = usePermission('mail-messages', room._id);
return useMemo(() => (hasPermission ? {
groups: ['channel', 'group', 'direct'],
id: 'export-messages',
anonymous: true,
title: 'Export_Messages',
icon: 'mail',
template: lazy(() => import('../../views/room/contextualBar/ExportMessages')) as LazyExoticComponent<FC>,
full: true,
order: 12,
} : null), [hasPermission]);
});