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/app/lib/server/functions/deleteRoom.js

10 lines
333 B

import { Messages, Subscriptions, Rooms } from '../../../models';
import { callbacks } from '../../../callbacks';
export const deleteRoom = function(rid) {
Messages.removeFilesByRoomId(rid);
Messages.removeByRoomId(rid);
Subscriptions.removeByRoomId(rid);
callbacks.run('afterDeleteRoom', rid);
return Rooms.removeById(rid);
};