Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to delete multiple messages at once #1861

Closed
thomasphilibert opened this issue Jan 12, 2016 · 20 comments · Fixed by #11236
Closed

Ability to delete multiple messages at once #1861

thomasphilibert opened this issue Jan 12, 2016 · 20 comments · Fixed by #11236
Labels

Comments

@thomasphilibert
Copy link

Hi all,

I suggest to add a button for clean all (or partial?) messages in group : There is not necessarily need to archive some discussions

Thomas

@thomasphilibert thomasphilibert changed the title "clean" button Suggest : A "clean" button Jan 12, 2016
@geekgonecrazy
Copy link
Contributor

@thomasphilibert so this would purge messages from the channel / group?

@thomasphilibert
Copy link
Author

Yes exactly ! For exemple, on my rocketchat we have a group called "cool stuff". I thinks is not important to store these messages indefinitely.

Thomas

@graywolf336
Copy link
Contributor

@thomasphilibert So, it actually removes the messages from the database or just removes them from being visible?

@marceloschmidt marceloschmidt changed the title Suggest : A "clean" button Ability to delete multiple messages at once Feb 4, 2016
@marceloschmidt
Copy link
Member

Deleting multiple messages at once could be useful. Maybe we can use the same UI for sending messages to an e-mail:

selectmessages

@geekgonecrazy
Copy link
Contributor

👍 this could be very useful

@Sing-Li
Copy link
Member

Sing-Li commented Feb 4, 2016

OH. Please make sure the selection mechanism is mobile friendly. There are a lot of problems associated with mapping shfit-click-drag style of select to a mobile touch interface.

@thomasphilibert
Copy link
Author

Nice feature Marcelo !

@graywolf336 Deleting from the database. A bit like the trash in your PC. If you want free space for one reason or another, it's a simple solution. We do not always need to store messages, no?

Thomas

@graywolf336
Copy link
Contributor

Unless you need to comply with some compliance out there. So, it should be a setting for the admins.

@benmcnelly
Copy link

I am pinging this, because I think we really need to be able to just do a one button "clean" that dumps a channel.

@andreas-bulling
Copy link

I think what we actually want/need is, in general, a mechanism to easily select multiple messages for subsequently deleting, moving, sending them etc. Maybe using some checkbox-like interface that only shows when the user clicks on a corresponding button somewhere. Or, even better, just by clicking on the message itself. At the moment, the message the mouse is hovering over is only highlighted. Could instead be used for selection if the user also clicks on individual messages.

@RichardFoxworthy
Copy link

When I delete a Channel, then recreate a new channel with same name, all the old messages reappear in the new chanel

@graywolf336
Copy link
Contributor

@RichardFoxworthy That's a whole other issue and not really related to this issue, mind creating a new one if there isn't another out there for that? Thanks!

@nemolivier
Copy link

More on this would be the hability to delete all messages of one user (think about troll). I may be wrong but I remember that kicking a member don't delete his messages.

@mddvul22
Copy link

mddvul22 commented Jul 6, 2016

Are there drawbacks to truncating the rocketchat_message collection in the database? For an admin who didn't want a record of any messages (group or direct) stored for long in the database, would this work as a crude solution to this issue? Would this break other parts of the database and/or Rocket Chat?

@engelgabriel engelgabriel added this to the Important milestone Jan 2, 2017
@harrv
Copy link

harrv commented Jun 7, 2017

I see that there is already a great UI mechanism for selecting multiple messages in the Mail Messages feature. Please use the same UI mechanism to allow anyone with delete-message permission to select multiple messages for deletion.

@jvacek
Copy link

jvacek commented Apr 3, 2018

@MartinSchoeler this ticket as well as #6000 have been marked as duplicate of each other and both closed, has this been resolved elsewhere?

@marceloschmidt marceloschmidt added the Feature: Planned Planned Feature label Apr 19, 2018
@marceloschmidt marceloschmidt removed the Feature: Request Requested Feature label Apr 19, 2018
@marceloschmidt
Copy link
Member

We discussed it and think it would be good to have a button that would nuke all room messages, instead of selecting which ones would be deleted.

@c0dzilla
Copy link
Contributor

c0dzilla commented Apr 19, 2018

There is already a method for this called cleanChannelHistory (here) that can delete all messages in a room. It can be accessed at the API route channels.cleanHistory. A UI option can be also be added that uses this.

@prohde
Copy link

prohde commented Apr 21, 2018

I think there is also a need to delete multiple messages in a channel but not all. On my Rocket.Chat instance we have some channels where we discuss things. Some of the messages are important and we want to keep them but several messages could be deleted after some time.

ggazzo pushed a commit that referenced this issue Jul 20, 2018
Closes #6749
Closes #8321
Closes #9374
Closes #2700
Closes #2639
Closes #2355 
Closes #1861
Closes #8757
Closes #7228
Closes #10870
Closes #6193 
Closes #11299
Closes #11468
Closes #9317
Closes #11300 (will incorporate a fix to this PR's issue)
Closes #11046 (will incorporate a fix to this PR's issue)
Contributes to #5944 
Contributes to #11475
_...and possibly more!_

This PR makes deleting messages (automatically and manually) a lot easier on Rocket.Chat.

- [X] Implement a bulk message deletion notification, to quickly push large message deletions to users without reload
  - [X] Use it in `rooms.cleanHistory`
  - [X] Use it in user deletions
- [X] Completely remove cleanChannelHistory as required by v0.67
  - [X] Remove server method `cleanChannelHistory`
  - [X] Remove REST API `channels.cleanHistory`
- [x] Implement a sidebar option to clean history
  - [x] Basic implementation
  - [x] Allow excluding pinned messages
  - [x] Allow attachment-only mode
  - [x] Allow specifying user(s) to narrow down to
    - [x] Also update REST API
    - [x] Also update docs
  - [x] Break the deletion into multiple different requests, so the client can keep track of progress
  - [x] Clear animation / progress bar for deleting
- [x] Retention policy
  - [X] Global, set by admin
    - [X] Global timer that runs every second and deletes messages over the set limit
      - [X] Can change its timer's resolution to prevent insane CPU overhead
    - [X] Admin can decide what room types to target (channels, groups and/or DMs)
    - [X] Allow excluding pinned messages
    - [X] Allow attachment-only mode
  - [x] Per-channel, set by those with a new permission
    - [x] Disabled when master switch off
    - [x] Set in channel info
    - [x] Can override global policy with a switch that requires `edit-privileged-setting`
    - [x] Allow excluding pinned messages
    - [x] Allow attachment-only mode
    - [x] Uses same global timer for cleanup
  - [X] Message at start of channel history / in channel info if there is a retention policy set
  - [x] Message in channel info if there is a retention policy set on that channel specifically
- [X] Make cleaning history also delete files (completely!)
  - [X] Manual purging
  - [X] Automatic purging
- [x] Make other deletions also delete files
  - [x] User deletion
    - [X] Own messages
    - [x] DMs with them's partner messages
  - [x] Room deletion
- [x] Cleanup
- [x] Finish related [docs](https://github.com/RocketChat/docs/pull/815)
- [x] Link to the docs in the settings

Please suggest any cool changes/additions! Any support is greatly appreciated.

**Breaking change:** This PR removes REST API endpoint `channels.cleanHistory` and Meteor callable `cleanChannelHistory` as per the protocol specified for them.

![bzzzzzzzz](https://user-images.githubusercontent.com/39674991/41799087-56d1dea0-7670-11e8-94c0-bc534b1f832d.png)
@theorenck theorenck removed this from the Mid-term milestone Dec 12, 2018
@ugzv
Copy link

ugzv commented Apr 3, 2020

Deleting messages 1 by 1 can be very time-consuming. Hopefully, this gets done in 2020.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.