Contact origins
For those who read this and don’t know what “origin” is: Delta Chat stores for each contact its “origin”. The origin can be a QR code scan, outgoing message recipient, incoming message recipient, address book etc. Origins have corresponding numbers, e.g. AddressBook origin is 0x80000, OutgoingTo is 0x4000, IncomingTo is 0x400. Lower origin may be overwritten with a higher one, e.g. if the contact was initially added because it appeared in the incoming message To field, but the user later responded to the group and has put this contact into the outgoing To field. Higher numbers roughly correspond to higher trust so it is possible to sort by “origin” and have separators between them. The list is unnecessarily long and distinguishes between contacts that appeared in the To and Cc fields (and even Bcc field which only exists in draft), for example. “Origin” existed since earliest versions of Delta Chat and is not well designed. All contacts quickly reach at least “OutgoingTo” level simply because you replied to some group where the contact is a member.
I suggest we forget that contact origins exist and look at concrete scenarios and decide whether we want the contact to end up in the “contact list” and whether we want the contact to show up in search. These scenarios can then be turned into tests.
When contacts are added to the “contact list”
I still do not know how contacts end up in the contact list in Signal. The documentation is not very good and it is difficult to test because I cannot create new profiles for testing. It seems my contact list includes at least the contacts from my phone address book found by the phone number and contacts I have added by scanning the username QR code. I don’t know if starting 1:1 chat with some group member will result in adding the contact to my contact list and if accepting a contact request for 1:1 chat results in adding the contact into my contact list.
We definitely want to add contacts to the contact list when we actively scan the 1:1 QR code (not group join QR code).
We do not want group members to end up in the “contact list” just because we joined the group (either by accepting contact request or scanning invite QR) and messaged there.
Where contact list is used
Contact list is important for the “who can call me” setting:
If we introduce it with “My contacts” as the default, compared to Telegram we will accept much more contacts, basically anyone from the groups we participate in can call us.