deltachat-core
deltachat-core copied to clipboard
deleting last chat left artifacts behind on server
After deleting the last chat, all chats were gone on the device, but the DeltaChat folder on the server was still there, and it still contained some of the messages. (Possibly ones that were sent by the device and uploaded through imap.)
Tested with a new install (v0.18.2)
- enabled qr lab functions
- scanned a qr
- exchanged a couple of messages
- manually deleted what looked like the handshake-messages in INBOX
- deleted last two text messages in deltachat, but then decided to delete all messages by deleting the whole chat.
just to note:
- deleting the chat does not delete the messages
- the DeltaChat folder is never deleted
Do I understand you correctly? Your points summarize the things that are not yet done, but would make deltachat behave nicely and solve the inconsistency with deleting individual messages.
Perfect. :)
no, i just want to summarize the current state. i do not really get what this issue is about :)
It's about DC not consistently cleaning up again.
-> Deleting (contained) messages on the server, when deleting a complete chat. And removing the chat folder if the last chat message is deleted .
delta chat leaves messages as a backup on the server if the chats are deleted.
i do not think that it is a big issue when the DeltaChat folder is not deleted if Delta Chat is uninstalled - even if we decide to add an option to delete complete Chats also from the server, imho this will always be optional, so if Delta Chat is used for more than five minutes, there is a very good chance that there are messages in the DeltaChat folder that are no longer under control of DeltaChat.
wrt handshake messages of the labs feature: you are right, they should not hang around somewhere, however, iirc think they are cleaned up "better" meanwhile.
This issue reveals inconsistencies in the deltachat-core code to manage messages on the server. It's a bad sign. It ought to get fixed because such things tend to provoke errors and inconsistencies and distrubances in other places, for example when trying to maintain server storage space limits.
if Delta Chat is used for more than five minutes, there is a very good chance that there are messages in the DeltaChat folder that are no longer under control of DeltaChat.
Ugh, what? Shouldn't IMAP clients always list the messages on the server (and keep a local db of synced and archived messages)? If deltachat is not in control, the user can't be in control of the messages.
just imaging the user replies to a Delta Chat messages with his normal MUA and/or moves messages into the DeltaChat folder.
I guess a new MUA reply could appear in the sent, inbox, and email chat folder. I imaginge deltachat adds it to the local database as a new message (in-reply-to), moves it to the chat folder if not there, and it would be deletable just as any other message.
In case the user does really copy some unrelated messages (emails not belonging to any chat) into the chat folder, i imagine only these would remain after the user deletes all chats in deltachat (in this case deltachat's attempt to delete the chat folder would correctly fail because it still contains the foreign artefacts).
due to many changes (single-folder etc.) i would target this issue later.
in general, i'm not sure, if it makes sense to keep chat-messages between device and sever in sync. there are several reasons why exactly this is not wanted.
however, the initially mentioned artefacts should be removed where possible. however, there are also some more concrete issues about them so maybe this one can be closed.
References please. What reasons and issues are you talking about?
Another occurence of this issues problem of re-downloading / syncing of priorly deleted messages: https://support.delta.chat/t/workaround-make-new-delta-chat-installation-import-old-messages-from-imap-directory/262/6