deltachat-core-rust icon indicating copy to clipboard operation
deltachat-core-rust copied to clipboard

feat: Delete messages from a chatmail server immediately by default (#5805)

Open iequidoo opened this issue 1 year ago • 4 comments

I.e. treat DeleteServerAfter == None as "delete at once". But when a backup is exported, set DeleteServerAfter to 0 so that the server decides when to delete messages, in order not to break the multi-device case. Even if a backup is not aimed for deploying more devices, DeleteServerAfter must be set to 0, otherwise the backup is half-useful because after a restoration the user wouldn't see new messages deleted by the device after the backup was done. But if the user explicitly set DeleteServerAfter, don't change it when exporting a backup. Anyway even for non-chatmail case the app should warn the user before a backup export if they have DeleteServerAfter enabled.

Also do the same after a backup import. While this isn't reliable as we can crash in between, this is a problem only for old backups, new backups already have DeleteServerAfter set if necessary.

Close #5805

iequidoo avatar Aug 02 '24 13:08 iequidoo

@r10s i made two changes to the logic in the #5805 description:

  • I don't change the setting if the user has modified it, e.g. they could change it to "Automatic", then to "At once", and they get what they want finally :) Anyway there's also the non-chatmail case with the same problem, i think a warning is needed before exporting a backup.
  • I don't change the setting after importing a backup as it's sufficient to change it before exporting. But maybe if it is None, it should be set to "Automatic" for chatmail because there may be old backups w/o this setting. EDIT: Done.

iequidoo avatar Aug 02 '24 13:08 iequidoo

ftr, when we merge this (i think, there is nothing blocking, still makes sense to get that that in after core 1.142.*), we need to:

  • file an issue for android to remove changing config values as added in https://github.com/deltachat/deltachat-android/pull/3147
  • file issues for ios/desktop to limit the options in case of chatmail similar to https://github.com/deltachat/deltachat-android/pull/3147

r10s avatar Aug 20 '24 11:08 r10s

Will the user's settings remain after updating the app?

Raiden-GH avatar Aug 29 '24 20:08 Raiden-GH

Will the user's settings remain after updating the app?

Yes, if the user modified the settings manually, they will remain. Otherwise the defaults may change across versions (in general), and the same applies to DeleteServerAfter in this PR.

iequidoo avatar Aug 29 '24 20:08 iequidoo

So this can be merged as 1.142.x is released from the stable branch anyway. But going to wait a bit for more reviews

iequidoo avatar Aug 30 '24 19:08 iequidoo