-
-
Notifications
You must be signed in to change notification settings - Fork 119
Description
Currently, as of version 2.35.0, we remember the last seen address for each contact and send to it.
If the last remembered address does not work anymore, e.g. because it is on the relay that is down or does not federate with the relay we send from, the message does not arrive: https://support.delta.chat/t/need-help-migrating-contacts-to-a-new-delta-chat-relay/4655/2
To fix this problem, the plan is to send to all relays of the contact. Contact should somehow distribute not only one address in the From field, but all relay addresses.
RFC 9580 defines notation data subpacket that allows to attach arbitrary data to the signature. It can be used to add all addresses in a way that will also be gossiped via Autocrypt-Gossip and is signed by the contact.
There is a prototype at https://codeberg.org/vu3rdd/notation
When sending to a contact, if the public key of the contact contains such relay list, we should only send to these addresses and ignore the remembered From address. The idea is that this will allow to use From addresses that cannot receive messages for some reason, e.g. for "sealed sender" feature. No concrete plan for any features yet and it may be not used, but adding From address to the signature explicitly allows this flexibility.
On the receiver side we need to make sure not to receive the same message twice. Simplest solution is to add a mutex to prevent running multiple receive_imf calls at once.