fix!: keep primary transport device-local

Devices no longer implicitely use the From address of sync messages
to determine their primary transport. Receivers have no concept of it and own devices
may disagree on which relay is reachable because of VPN or different networks:

1. Make setting a primary transport (`configured_addr`) a per-device non-synced operation.

2. Transport rows (add/remove/unpublish) keep syncing like before.

3. A device reelects a primary if a sync message unpublished/removed the current primary
   if there is a better candidate.

4. `TransportsModified` event is emitted at most once on an incoming transport sync message.

Users will notice the change in that changing primary transport in settings/advanced/relays
will not synchronize to other devices anymore.
This commit is contained in:
holger krekel
2026-08-10 14:43:28 +02:00
parent 2cacdbfd4b
commit cd42efb36d
5 changed files with 158 additions and 80 deletions
+3 -1
View File
@@ -192,7 +192,9 @@ pub enum Config {
#[strum(props(default = "0"))]
DeleteDeviceAfter,
/// The primary email address.
/// The primary email address, used for sending and background fetch.
///
/// Device-local, other devices keep their own primary transport.
ConfiguredAddr,
/// Deprecated(2026-04).