Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

Delete livechat rooms

Open chainmueller opened this issue 9 years ago • 4 comments

Rocket.Chat Version: 0.55.1 Running Instances: 1 DB Replicaset OpLog: Disabled Node Version: v4.8.1

Hello again :)

Is there a possibility to delete the livechat rooms?

If not, which entries do i have to delete in the mongo db?

Best wishes and thanks in advance

chainmueller avatar Jun 06 '17 06:06 chainmueller

You can close a room by: image

legendecas avatar Jun 06 '17 07:06 legendecas

Thank you for your answer. I am aware that I can close a room this way. But it still remains in the list of rooms on the left side. And I know that I can hide it after it is closed.

But there is now way to delete it at the moment right?

chainmueller avatar Jun 06 '17 08:06 chainmueller

right @chainmueller .. there is no way to delete them at the moment.

how you would like to have this feature? like having a way to mass-delete them? being able to delete one-by-one? having a setting to remove them like after 1 month they were closed?

if you want to delete them from the mongodb, you could run something like (please backup your data first):

db['rocketchat_room'].find({ t: 'l', open: { $exists: false }}).forEach(function(room) {
  db['rocketchat_message'].remove({ rid: room._id }, { multi: true });
  db['rocketchat_subscription'].remove({ rid: room._id }, { multi: true });
  db['rocketchat_room'].remove({ _id: room._id });
});

this would delete all closed livechat rooms.

sampaiodiego avatar Jun 06 '17 12:06 sampaiodiego

I'll close this in favor of #5481

sampaiodiego avatar Jun 06 '17 13:06 sampaiodiego