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/apps/meteor/app/e2e/server/beforeCreateRoom.ts

12 lines
437 B

import { callbacks } from '../../../lib/callbacks';
import { settings } from '../../settings/server';
callbacks.add('beforeCreateRoom', ({ type, extraData }) => {
if (
settings.get<boolean>('E2E_Enable') &&
((type === 'd' && settings.get<boolean>('E2E_Enabled_Default_DirectRooms')) ||
(type === 'p' && settings.get<boolean>('E2E_Enabled_Default_PrivateRooms')))
) {
extraData.encrypted = extraData.encrypted ?? true;
}
});