[WIP] feat!: Show a ~
in front of contact names if the name wasn't explicitly set
#6411
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Eve can just change her displayname to "Bob", and Alice's device will show the messages as coming from "Bob".
Or, Eve can just change her displayname to "Saved Messages", and then her chat will be shown as if it was Saved Messages, so that people may send private information to her instead of saving it to the Saved Messages.
Solution
There is a
~
in front of the name if it's just the name chosen by the sender, rather than the name with which you saved them into your contact book. This is the same behavior as WhatsApp has, so people know it already.@hpk42 and me think that this small change will make the problem stated above a lot smaller already, although of course the
~
can always be overlooked.This PR doesn't add any migration for 1:1 chat names. This means that, as of now, chat names will only get the
~
the next time the name changes. Not sure whether we should change this.Future work
UIs should make it easy to set a display name, e.g. by automatically opening the contact-edit screen after scanning a QR code and by requiring not more than 2 clicks to get to the contact-edit screen from the chat (there could e.g. be a prominent button "Set a name for this contact"/"Name this contact" in the profile or in the chat. And when clicking the contact name in the profile, the edit-contact activity should also open.
BREAKING CHANGE: UIs need to stop adding a
~
to the OverrideSendername, see deltachat/deltachat-android#3520