Skip to content

Deleting a user doesn't delete rocketchat_subscription's for DM's #6535

@12test12

Description

@12test12

Rocket.Chat Version: 0.54.2
Running Instances: 1
DB Replicaset OpLog: Disabled
Node Version: 4.8.1

I had the same problem like #1149.

I followed kalebwalton solution step to solve the problem.

use mydb
db.users.find(
{"username":"kwalton"}
) <-- just to make sure the user existed
db.users.remove(
{"username":"kwalton"}
) <-- deletes the user
Then I re-logged in to Rocket.Chat and it worked. But I ran into another issue where I couldn't direct message someone, so I went back into mongo and:
use mydb
db.rocketchat_subscription.find({"name":"kwalton"}) <-- copied the rid value for the person and my conversation
db.rocketchat_subscription.remove({"name":"kwalton"}) <-- deletes my subscriptions
db.rocketchat_room.find({"_id":""}) <-- just to make sure the room exists
db.rocketchat_room.remove({"_id":""}) <-- remove the room
Also found any other rooms that matched the other person and I:
db.rocketchat_room.find({"usernames" : [ "theotherperson", "kwalton" ]})
db.rocketchat_room.remove({"usernames" : [ "theotherperson", "kwalton" ]}) <-- removed all rooms between us, appeared to be a dupe in there causing trouble

But now I have an other problem.
Now it says "No user with username was found!" when trying to access the direct message.
issue

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions