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

Deleting user doesn't delete messages

Open dandv opened this issue 10 years ago • 11 comments

0.21.0, commit hash ...dac592

  1. Log in as user X and leave some messages in #general
  2. In a different tab, log in as an admin and delete user X. Notice the warning dialog saying that the user's messages will be deleted.

A third user who was watching #general reports that user X's messages are still there. Hard reloading the page no longer shows the deleted user's messages. When I wanted to join #general as the admin user, the preview mode still showed the messages.

Possibly related: #1149, #739

dandv avatar Mar 30 '16 00:03 dandv

We dont send the "remove" message for each deleted message on this event, as it may be a lot of traffic. We could maybe send the delete user event to all logged users, so they can delete the messaged on the client.

engelgabriel avatar Mar 30 '16 01:03 engelgabriel

It would be something similar to the UPDATE AVATAR :)

engelgabriel avatar Mar 30 '16 01:03 engelgabriel

I am not sure I understand the logic behind this - why delete all messages of a deleted user at all/by default? Couldn't it be that some messages the user posted are still of value to others even if the user himself is not active any more? I would at least leave the decision to also delete all messages to the admin so he can do this on a case-by-case basis.

andreas-bulling avatar Mar 30 '16 05:03 andreas-bulling

@andreas-bulling +1

dytec avatar Mar 30 '16 07:03 dytec

In that case you should not DELETE the user, but just DEACTIVATE instead. If you REALLY want to delete the user record, we have to delete related references to keep DB integrity.

engelgabriel avatar Mar 30 '16 12:03 engelgabriel

@engelgabriel that makes sense. What does DEACTIVATE involve - the user is not able to login anymore etc?

andreas-bulling avatar Mar 30 '16 12:03 andreas-bulling

Yes, the user looses access completely.

engelgabriel avatar Mar 30 '16 12:03 engelgabriel

When the user is deactivated, we can still find them on the member list, is there option to not show them?

imtrobin avatar Aug 12 '16 04:08 imtrobin

PR #9947 adds the option to delete an user without removing their messages.

Hudell avatar Mar 12 '18 15:03 Hudell

https://github.com/RocketChat/Rocket.Chat/issues/6535

engelgabriel avatar May 05 '18 01:05 engelgabriel

This will be implemented in #11236 :)

vynmera avatar Jun 25 '18 15:06 vynmera