deltachat-core-rust icon indicating copy to clipboard operation
deltachat-core-rust copied to clipboard

synchronization of delete messages not working with multiple devices

Open DynamicOperationsArchitect opened this issue 1 year ago • 5 comments

Operating System (Linux/Mac/Windows/iOS/Android) / Delta Chat Version: Delta Chat Desktop 1.42.2 on Debian 12 installed via deb Delta Chat Desktop 1.42.2 on openSUSE 15 installed via flathub Delta Chat 1.42.6 on Android installed via F-Droid

Expected behavior: Deleted messages disappear from all devices.

Actual behavior: Only messages deleted on the "local" device disappear. Messaged deleted by other devices stay visible in the chats.

Steps to reproduce the problem: I sent test messaged from each of my devices to one of my contacts. Afterward I deleted some of those messages from devices which had not sent the corresponding message. After some time the mails were deleted from the server. What did not happen, even after waiting for some time and restarting all clients, is the synchronization of the deleted messages between my devices. I now see different messages on all of my devices although these messages have been deleted on other devices and are no longer available on the server.

This never worked and that was on purpose. Some people told that they sometimes delete huge messages from their phone, but prefer to have them on Desktop. Another reason is to delete confidential messages from a device that potentially can be lost. But i agree that most of the times it's not what people expect. So, i'd suggest to indeed synchronise message deletion, but in order not to break the existing UX much, move messages to some device-local special chat instead of just deleting on other devices, but instead of "Forwarded Message" header add smth like "Deleted from chat ...". Then this device-local chat can be cleared manually on another device and that would be just a couple of clicks instead of repeating the same work on all devices as now. CC @link2xt

iequidoo avatar Jan 08 '24 00:01 iequidoo

I have thought about deleting messages when they are moved to Trash IMAP folder and move to Trash when deleting, so deletion can be synchronized even to other clients. This would allow the server to delete your messages which may be not wanted though.

So, i'd suggest to indeed synchronise message deletion, but in order not to break the existing UX much, move messages to some device-local special chat instead of just deleting on other devices, but instead of "Forwarded Message" header add smth like "Deleted from chat ...". Then this device-local chat can be cleared manually on another device and that would be just a couple of clicks instead of repeating the same work on all devices as now.

For me more important in this case would be to have an "undo" function so if I see all my messages were moved to "recycle bin" I can restore them all at once and maybe disable synchronization if there is such option.

link2xt avatar Jan 08 '24 03:01 link2xt

I have thought about deleting messages when they are moved to Trash IMAP folder and move to Trash when deleting, so deletion can be synchronized even to other clients. This would allow the server to delete your messages which may be not wanted though.

Yes, doesn't look like an option, and also messages would remain in Trash for long and can be read/decrypted which isn't safe.

For me more important in this case would be to have an "undo" function so if I see all my messages were moved to "recycle bin" I can restore them all at once and maybe disable synchronization if there is such option.

A device-local Recycle Bin sounds good. Then maybe even on the first device messages should go there, this wouldn't break the current UX much. And as for the restoration, no sync is needed here, it's not done frequently.

iequidoo avatar Jan 08 '24 18:01 iequidoo

Maybe we can have a global setting like "synchronize server-side deletions" which is disabled by default. Then its up to the user to decide how trustworthy the provider is.

We already have the synchronisation mechanism used to sync chat states f.e., see https://github.com/deltachat/deltachat-core-rust/blob/main/src/sync.rs. So we don't need to trust the email provider to implement this. But we need to decide how a user should interact with the suggested "recycle bin" and how to keep the UX as close as posiible to the current one

iequidoo avatar Jan 16 '24 04:01 iequidoo