-
-
Notifications
You must be signed in to change notification settings - Fork 112
fix: always set bcc_self on backup import/export #7440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
This is needed for multiple reasons:
|
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.
cb02fa5 to
36f868e
Compare
iequidoo
left a comment
There was a problem hiding this 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? { |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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.
|
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.
We want to make We cannot just change the default meaning of |
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. |
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.