mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-26 15:36:40 +00:00
Fix backup/import issue with expiring messages.
There was an issue where we were backing up group receipts and attachments that were for expiring messages (which are already excluded from the backup). This commit excludes these items from the backup, and for backups made before this change, this commit also deletes these invalid entries at the end of the restore process. We also do a little database migration to cleanup any bad state that may have been imported in the past.
This commit is contained in:
@@ -82,6 +82,7 @@ public class DatabaseUpgradeActivity extends BaseActivity {
|
||||
public static final int REMOVE_JOURNAL = 353;
|
||||
public static final int REMOVE_CACHE = 354;
|
||||
public static final int FULL_TEXT_SEARCH = 358;
|
||||
public static final int BAD_IMPORT_CLEANUP = 373;
|
||||
|
||||
private static final SortedSet<Integer> UPGRADE_VERSIONS = new TreeSet<Integer>() {{
|
||||
add(NO_MORE_KEY_EXCHANGE_PREFIX_VERSION);
|
||||
@@ -103,6 +104,7 @@ public class DatabaseUpgradeActivity extends BaseActivity {
|
||||
add(SQLCIPHER_COMPLETE);
|
||||
add(REMOVE_CACHE);
|
||||
add(FULL_TEXT_SEARCH);
|
||||
add(BAD_IMPORT_CLEANUP);
|
||||
}};
|
||||
|
||||
private MasterSecret masterSecret;
|
||||
|
||||
Reference in New Issue
Block a user