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

feat: Sync chats deletion across devices

Open iequidoo opened this issue 2 years ago • 6 comments

feat: Sync chats deletion across devices

Motivation: Now broadcast lists creation is synced across devices. Groups creation, in some means, too -- on a group promotion by a first message. So, to make this looking more feature-complete, sync chats deletion too.

An approach is to replay a user action on synchronised devices because the chat deletion is a complex procedure affecting several tables, self-chat, emitting the corresponding event etc.

Also this commit makes all deletions to happen in a transaction, to be on a safe side.

iequidoo avatar Nov 15 '23 06:11 iequidoo

general comment: please describe a description for your PRs, summarizing the motivation/reason and the approach/solution.

hpk42 avatar Nov 15 '23 16:11 hpk42

general comment: please describe a description for your PRs, summarizing the motivation/reason and the approach/solution.

Added a commit message. Yes, i hurried to share this work. Actually it should be a draft w/o good commit messages

iequidoo avatar Nov 16 '23 01:11 iequidoo

I have mixed feelings about chat deletion, users might expect it to delete all imap emails / messages from that chat too.

I wouldn't sync chat deletion before we sync message deletion.

Simon-Laux avatar Nov 16 '23 01:11 Simon-Laux

I have mixed feelings about chat deletion, users might expect it to delete all imap emails / messages from that chat too.

I wouldn't sync chat deletion before we sync message deletion.

But these are independent things actually, one doesn't make another worse.

iequidoo avatar Nov 16 '23 01:11 iequidoo

For deletion current plan is not to release it into 1.42 series and stabilize everything else first. Deletion is destructive and therefore dangerous, let's test how well pinning/renaming works first on a large scale.

link2xt avatar Nov 16 '23 01:11 link2xt

There may be a problem with synchronising chats deletion -- if another device has DeleteServerAfter set, messages wouldn't be deleted from the server as a user might think. But this is the problem also with the current chat deletion functionality probably -- chat messages remain on the server.

iequidoo avatar Nov 16 '23 02:11 iequidoo