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

Ability to delete chat history

Open mikrobyte opened this issue 10 years ago • 62 comments

Your Rocket.Chat version: 0.19.0

This is not an issue per se, but more of an enhancement request if possible.

It would be nice to have the ability to delete a chat's history, could be a room's history, or a 1 to 1 chat history. Totally, all messages displayed in a given room. Or delete all messages older than $DATE , or delete all messages between DATE1 and DATE2.

mikrobyte avatar Feb 26 '16 12:02 mikrobyte

Could be that this feature is only available for server admins.

mikrobyte avatar Feb 26 '16 12:02 mikrobyte

you can delete rooms (again - check #2351) - look: image

sampaiodiego avatar Feb 29 '16 13:02 sampaiodiego

Thanks sampaiodiego, that is nice to know. However, it would be very nice to have the ability, as an admin, to auto expire messages. Perhaps a system-wide setting to forget messages older than a given time period. Or, perhaps to forget messages once a user logs out. Or perhaps best of all, to never keep messages on the server at all.

mddvul22 avatar Jul 01 '16 19:07 mddvul22

Agree with this. Setting up auto-expiring channel history(like, daily, weekly) could be interesting in some cases. We are doing some integration of Rocket.Chat with Zabbix, and the channel that receives the notifications could be cleared from time to time to avoid long history and keeping daily notifications clean.

Meanwhile we can delete and recreate the channel from time to time, but we have to ask to all members to refresh their browsers since it keeps some of the old channel cache showing(and blocking new messages to be sent)

nwildner avatar Jul 29 '16 20:07 nwildner

I recently installed a fresh version of Rocket.Chat and played a bit. To not need to recreate a channel everytime, there IS some need to cleanup the thread. Is it possible to just clean previous messages from some message/time? (Especially automatization-chats would benefit from this)

FibreFoX avatar Aug 18 '16 06:08 FibreFoX

With a MongoDB Query you can delete all messages in the whole db "less than" a specific date.

db.rocketchat_message.remove( { ts: { $lt: ISODate("2016-08-01") } } );

It is not the best solution, but in our company we had to find a workaround until the developers add some cleanup features.

kvnblank avatar Aug 18 '16 07:08 kvnblank

Another vote for this feature. We have a channel that logs a certain kind of exceptions from our sytems and those tend to be rather large - so the channel becomes very slow to load in short order.

Currently I'm deleting and recreating the channel on a regular basis, but that's not really a "solution"

ulope avatar Nov 09 '16 11:11 ulope

is this something that is close to being usable the ability to remove all chat without having to remove the channel would be amazing or at least a way to clean the database...

dtech4you avatar Dec 23 '16 22:12 dtech4you

+1 for this feature

9joshua avatar Jan 02 '17 04:01 9joshua

+1 from me as well.

cellisten avatar Jan 04 '17 12:01 cellisten

+1

The functionality I would like is slightly different, I'd like to clear DM's on logout

I could help test if needed

seanloosier avatar Jan 05 '17 19:01 seanloosier

+1

ydixken avatar Jan 09 '17 09:01 ydixken

Dear +1ers, you can just click on the first post and add your thumbs-up there. :)

Regarding the feature, I think it would be extremely useful to be able to choose between 1) delete permanently, or 2) archive (perhaps to S3?) then delete.

antgel avatar Jan 09 '17 13:01 antgel

Dear +1ers, you can just click on the first post and add your thumbs-up there.

Yes but it wouldn't keep this thread alive nearly as well :)

9joshua avatar Jan 09 '17 18:01 9joshua

Yes but it wouldn't keep this thread alive nearly as well :) Thats no real reason, because it makes this thread just noisy.

As this project is pull-request friendly, maybe someone can create a PR instead of just +1-ing? I'm currently not (yet) able to develop, but I'm preparing to. Maybe I will fast enough to develop this feature (but I doubt it, because I'm not used to develop meteor-driven apps)

FibreFoX avatar Jan 09 '17 18:01 FibreFoX

Added some thumbs up per suggestions :)

seanloosier avatar Jan 10 '17 18:01 seanloosier

After digging around a bit, this feature seems to already exist: https://rocket.chat/docs/developer-guides/rest-api/channels/cleanhistory

As far as I understood, this only is a missing button, am I correct?

EDIT: there is even some permission already: clean-channel-history

FibreFoX avatar Jan 10 '17 19:01 FibreFoX

That seems to be only for channels, right? I believe this is for deleting other stuff, as well.

mddvul22 avatar Jan 10 '17 19:01 mddvul22

@mddvul22 looking at the sourcecode, it only is for channels: https://github.com/RocketChat/Rocket.Chat/blob/bf65a13978e2dd165b1b4978597f6a90cba7666e/packages/rocketchat-api/server/v1/channels.js#L62

FibreFoX avatar Jan 10 '17 20:01 FibreFoX

It does not work for private groups which you temporarily change to public channel for a minute, just to be able to use the api - so either this functionality needs to be duplicated for private groups, or it needs to be fixed so that the workaround works

sinteur avatar Feb 01 '17 11:02 sinteur