Skip to content

Conversation

@link2xt
Copy link
Collaborator

@link2xt link2xt commented Nov 13, 2025

Regardless of whether chatmail relay is used or not, bcc_self should be enabled when second device is added. It should also be enabled again even if the user
has turned it off manually.

@link2xt
Copy link
Collaborator Author

link2xt commented Nov 13, 2025

This is needed for multiple reasons:

  1. We are going to set bcc_self to "manually set" 0 when the first profile is set up regardless of whether profile is a "chatmail" or "classic email" profile. See [Tracking Issue] Multi-transport #7357 We still want bcc_self to be enabled automatically afterwards. Reducing number of is_chatmail is needed for multi-transport because profiles can have a non-chatmail transport together with chatmail transports.
  2. Delta Chat is going to allow the users to set bcc_self manually for chatmail profiles: unify multi-device into a single setting deltachat/deltachat-android#4019
  3. It makes sense to enable bcc_self even for non-chatmail when second device is set up, otherwise you get a broken setup where outgoing messages are not synced and sync messages are not sent.

@link2xt link2xt mentioned this pull request Nov 13, 2025
6 tasks
@link2xt link2xt requested review from Hocuri and iequidoo November 13, 2025 23:27
Regardless of whether chatmail relay is used or not,
bcc_self should be enabled when second device is added.
It should also be enabled again even if the user
has turned it off manually.
@link2xt link2xt force-pushed the link2xt/bcc-self-always-set branch from cb02fa5 to 36f868e Compare November 14, 2025 03:52
@link2xt link2xt requested a review from Simon-Laux November 14, 2025 03:53
Copy link
Collaborator

@iequidoo iequidoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes sense to enable bcc_self even for non-chatmail when second device is set up, otherwise you get a broken setup where outgoing messages are not synced and sync messages are not sent.

This is an advanced setting, so if the user changed it and then sets up a new device, they should understand what they do. Maybe the user just moves to another device.

I'm not going to object against this change, but showing some message to the user would be a good and respectful thing.

/// between, but this is a problem only for old backups, new backups already have `BccSelf` set if
/// necessary.
async fn adjust_bcc_self(context: &Context) -> Result<()> {
if context.is_chatmail().await? && !context.config_exists(Config::BccSelf).await? {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to clarify the logic here: is_chatmail() is checked because for non-chatmail BccSelf is true by default anyway, and config_exists(Config::BccSelf) is checked because that time it was decided that it's not good to change settings which the user modified by hand (i think we should really avoid this or at least not do it silently)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wrote more below and added a section to #7357 so we don't forget about it.
I'd wait until deltachat/deltachat-android#4019 is merged first and also open a PR with disabling bcc_self by default for all new profiles.

@iequidoo
Copy link
Collaborator

Maybe just add a device message telling that bcc_self was changed and the user should review it because it was set manually before? It may be untranslated, the setting is advanced, i don't think users touching it will complain

@link2xt
Copy link
Collaborator Author

link2xt commented Nov 14, 2025

Maybe just add a device message telling that bcc_self was changed and the user should review it because it was set manually before? It may be untranslated, the setting is advanced, i don't think users touching it will complain

We have a device message when transferring to second device. We can say there that "Multi-device mode was enabled" once we have the name for this function: deltachat/deltachat-android#4019 (also should be on other platforms). Then if user is just switching the device, they may turn the setting off after uninstalling the original device, but it's also fine if they don't.

When exporting a backup to disk we should probably just not enable this setting, transferring a backup manually is for expert users and then they can enable this setting manually as well, most users should use "setup second device" feature and there enabling bcc_self automatically should happen in any case as not synchronized messages is worse than the case where the user has switched from one device to another and forgot to backup.

This is an advanced setting, so if the user changed it and then sets up a new device, they should understand what they do. Maybe the user just moves to another device.

We want to make bcc_self = 0 a new default for all profiles and minimize the difference between chatmail and non-chatmail profiles: #7357
My plan for this is to set bcc_self to "0" explicitly when configuring the first transport (I already have commits doing this on top of #7348 ready for a separate PR once this PR 7440 is merged).

We cannot just change the default meaning of None because it will disable multi-transport for non-chatmail which is currently enabled by default. The other option would be doing a migration that converts None to "0" for unconfigured profiles only but this also loses the information on whether it was explicitly set to "0" by the user or not. If we want to track if bcc_self was ever changed by the user then we will need to introduce even more values or another hidden config "user has changed bcc_self", but I don't think we want such complexity. bcc_self is not really an advanced setting that user changes because they understand sending to self, and sync messages and how it affects, just because they turned it off once (even if there is a warning about breaking multi-device setup) does not mean that they will from now on always remember to turn it back on manually when needed.

@link2xt link2xt merged commit 6611a9f into main Nov 14, 2025
29 checks passed
@link2xt link2xt deleted the link2xt/bcc-self-always-set branch November 14, 2025 20:00
@iequidoo
Copy link
Collaborator

If we want to track if bcc_self was ever changed by the user then we will need to introduce even more values or another hidden config "user has changed bcc_self", but I don't think we want such complexity.

Since we only change it from the default 0 to 1 when switching to multi-device, we only need to know if it was manualy set to 0, there's no need to add an extra state to the db for this. I agree that the user shouldn't know all scenarios when it should be turned on back and it's better to do this automatically, but adding a messages about what is changed in the settings and why would be good. But if we're going to replace bcc_self in UIs with "Multi-device mode", this can be done later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants