How can I delete a contact?

Delta Chat version
1.8.1 (nothing more recent on F-Droid)

Expected behavior
menu entry to delete a contact
Should make sure all posts and keys get deleted, ideally even from the server.

Actual behavior
It seems to me that you can only delete a chat, but Delta Chat keeps the encryption key (does it?), and messages stay on the server.

Correct, Delta Chat will not delete messages from and to a contact when you delete the chat history. But you can delete individual messages of a chat history, this will delete the appropriate message from the server, too.

What about keys? Will they stay forever?

This is how the initial question came to my mind: I just deleted a test account in two Delta Chat instances. One instance was the Android dev app that I had been running in parallel for testing purposes and that I completely uninstalled. Then I deleted the chat in my main instance. Because of the lack of a corresponding menu item, I suspect Delta Chat to still store the abandoned key of my test account. While this suspicion won’t ruin my life :wink: it feels like the app is not completely ready to handle the case of properly deleting a contact.

What do you think of a key manager to see, delete, export, etc. all stored keys?

The problem of Delta Chat not deleting the emails from the inbox resp. the DeltaChat folder when deleting a chat could be solved by regularly deleting them no matter the sender. (I think this could be Delta Chat’s default anyway, both to save space and to improve privacy. But I’m getting off topic.)

A key manager would be a great tool, maybe it will be available in a future update.

On the other hand, users who have no knowledge of how PGP encryption works should be guided so they cannot break it. This can be quite a challenge, because Delta Chat is designed to be as simple as possible in comparison to other messengers where someone does not have to even think about encryption.

1 Like

I somehow don’t get the meaning of this sentence, corresponding to what?

If this matter is so important to you, you can look inside the database yourself so you don’t need to speculate.:wink:
If its on android start a backup and (after transferring the backup to an computer) open the backup file with https://sqlitebrowser.org/ as it is “just” an SQLite database.

[note to future folks: the backup format will change in the future to a zip format and we plan to encrypt the backup/database in the future so it could be that this method doesn’t work at is anymore]

Good idea but not too easy to implement in a way that the average user can not break it, whats your usecase? removing evidence that you had the key of someone?
Also this is quite a bit of UI work, and that for a feature that only enthusiasts if anyone at all will use (but it could help devs with debugging so maybe in an advanced debugging menu at first?)

Nope, currently a chat doesn’t delete the message because the function to clear a chat (delete all messages) isn’t implemented yet. At the moment the function is just deleting the message entries from the local db (deltachat-core-rust/src/chat.rs at f1b3527ad013ea61613c65caba448dcf3ca5724f · deltachat/deltachat-core-rust · GitHub),
I think there will be a “also delete messages on server” checkbox in the confirmation dialog on deleting a chat or sth. like that.
And this also brings us to the question how to delete messages in a multi device setup…
But as you mentioned, discussing this is stuff for a dedicated topic.

PS: look at the new autodelete feature it deletes old messages on the server and/or device after a configurable delay.

UPDATE: just saw your using f-droid, this means you will have to wait until the f-droid stuff is fixed again for the newer features. Fix f-droid build issue · Issue #1459 · deltachat/deltachat-android · GitHub

1 Like

you can only delete a contact if you have no reference to it. (no mutual chats, not messages from that contact).
an idea for the future:
I could imagine that we could anonymize the user for the messages that still exist so that the name says “deleted user” on messages from that user and the email address is replaced by the pseudo address deleted@local which you can not write to. But with this you still need to leave your mutual groups.

Note: we don’t have an address-book currently the contacts in deltachat are mainly for auto-completion of email addresses and to keep track of avatar and keys.

1 Like