You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The main point is that we cannot just ignore such messages when migrating, in case the message is the beginning of the thread.
A possible solution is to migrate the message and then delete it, if the _hidden flag is set. This will allow us to save threads that started with a deleted message.
The text was updated successfully, but these errors were encountered:
drygdryg
changed the title
Messages deleted using the _hidden=true are not marked as deleted/are not ignored during migration
Messages deleted using "_hidden":true are not marked as deleted/are not ignored during migration
Aug 5, 2024
A possible solution is to migrate the message and then delete it, if the _hidden flag is set. This will allow us to save threads that started with a deleted message.
This will not work as required because Rocket.Chat, when deleting a message, adds t: 'rm' to the original MongoDB document and then creates a copy of it setting _hidden: true.
We probably need to process messages with type "rm" and ignore messages with _hidden. And after all the messages have been migrated, we need to run an iteration and delete all messages with the "rm" type using the Matrix redact event.
Rocket.Chat in some cases sets the
"_hidden":true"
property instead of deleting a message from MongoDB, which leads to inclusion of such messages in the mongoexport.The proof of this behavior in the Rocket.Chat server side source code: https://github.com/RocketChat/Rocket.Chat/blob/41b1407804ce17bb54b79cda607554c474246f29/apps/meteor/app/lib/server/functions/deleteMessage.ts#L56
The main point is that we cannot just ignore such messages when migrating, in case the message is the beginning of the thread.
A possible solution is to migrate the message and then delete it, if the
_hidden
flag is set. This will allow us to save threads that started with a deleted message.The text was updated successfully, but these errors were encountered: