diff --git a/src/org/thoughtcrime/securesms/DatabaseUpgradeActivity.java b/src/org/thoughtcrime/securesms/DatabaseUpgradeActivity.java index f4d0ae7678..f53b9fab91 100644 --- a/src/org/thoughtcrime/securesms/DatabaseUpgradeActivity.java +++ b/src/org/thoughtcrime/securesms/DatabaseUpgradeActivity.java @@ -34,6 +34,7 @@ import org.thoughtcrime.securesms.crypto.storage.TextSecureSessionStore; import org.thoughtcrime.securesms.database.DatabaseFactory; import org.thoughtcrime.securesms.database.PushDatabase; import org.thoughtcrime.securesms.jobs.CreateSignedPreKeyJob; +import org.thoughtcrime.securesms.jobs.DirectoryRefreshJob; import org.thoughtcrime.securesms.jobs.PushDecryptJob; import org.thoughtcrime.securesms.notifications.MessageNotifier; import org.thoughtcrime.securesms.util.Util; @@ -54,7 +55,8 @@ public class DatabaseUpgradeActivity extends BaseActivity { public static final int SIGNED_PREKEY_VERSION = 83; public static final int NO_DECRYPT_QUEUE_VERSION = 113; public static final int PUSH_DECRYPT_SERIAL_ID_VERSION = 131; - public static final int MIGRATE_SESSION_PLAINTEXT = 133; + public static final int MIGRATE_SESSION_PLAINTEXT = 135; + public static final int CONTACTS_ACCOUNT_VERSION = 135; private static final SortedSet UPGRADE_VERSIONS = new TreeSet() {{ add(NO_MORE_KEY_EXCHANGE_PREFIX_VERSION); @@ -187,6 +189,12 @@ public class DatabaseUpgradeActivity extends BaseActivity { scheduleMessagesInPushDatabase(context);; } + if (params[0] < CONTACTS_ACCOUNT_VERSION) { + ApplicationContext.getInstance(getApplicationContext()) + .getJobManager() + .add(new DirectoryRefreshJob(getApplicationContext())); + } + return null; }