-
-
Notifications
You must be signed in to change notification settings - Fork 110
Description
Adding second transport and switching to it is already tested in #7348
There are APIs to list transports, add transports, remove transports and reconfigure existing transports.
Selecting the "primary transport" works by setting configured_addr to one of the already configured transports.
There are some settings that are currently configured globally that we don't want to make configurable per-transport:
sentbox_watch(removed in feat: Remove Config::{SentboxWatch,ConfiguredSentboxFolder} (#7178) #7189)show_emails(defaults to showing all messages, will stay this way)mvbox_move(defaults to 1 for non-chatmail, will default to 0)only_fetch_mvbox(very special setting, defaults to 0 and should default to 0, we want to get rid of it eventually)
show_emails will remain global. If someone wants to configure it to something other than "all mails" (2) it is possible, but creating one transport which fetches non-chat messages and the other that does not is not going to be an option.
mvbox_move and only_fetch_mvbox will remain, but will only apply to the first transport. They should be moved to the first transport configuration in the UI.
For mvbox_move the plan is to explicitly set it to 0 when configuring the first transport, regardless of whether it is chatmail or not. It will also be required to be set to 0 to configure second transport and will not be settable to 1 if multiple transports are configured. Default in case there is no database row should remain as it is.
only_fetch_mvbox will also be required to be set to 0 to use multi-transport. Some users have a server-side rule that moves chat messages (by encrypted messages to movebox
mvbox_move,only_fetch_mvbox,show_emailsshould be explicitly set in the database when configuring the first transport. We cannot change what the "unset" value means.- Configuring second transport should not be possible if one of these settings is set to non-default value.
- Changing any of these settings to non-default value should not be possible if there are multiple configured transports.
- Changing
configured_addrchanges the primary transport. When settingconfigured_addr, it should be checked that corresponding transport exists. - User ID in the key should be updated with the new list of addresses or the new primary address
Android issue about using list_transports API: deltachat/deltachat-android#3970
Desktop issue: deltachat/deltachat-desktop#5648