mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 09:49:30 +01:00
Add explicit exceptions and group_type correction.
This commit is contained in:
committed by
Greyson Parrelli
parent
539cd4059d
commit
1b053a2613
@@ -599,7 +599,7 @@ class DistributionListDatabase constructor(context: Context?, databaseHelper: Si
|
||||
SignalDatabase.recipients.updateStorageId(recipientId, update.new.id.raw)
|
||||
|
||||
if (update.new.deletedAtTimestamp > 0L) {
|
||||
if (distributionId.asUuid().equals(DistributionId.MY_STORY.asUuid())) {
|
||||
if (distributionId == DistributionId.MY_STORY) {
|
||||
Log.w(TAG, "Refusing to delete My Story.")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -207,8 +207,9 @@ object SignalDatabaseMigrations {
|
||||
private const val EXPIRING_PROFILE_CREDENTIALS = 149
|
||||
private const val URGENT_FLAG = 150
|
||||
private const val MY_STORY_MIGRATION = 151
|
||||
private const val STORY_GROUP_TYPES = 152
|
||||
|
||||
const val DATABASE_VERSION = 151
|
||||
const val DATABASE_VERSION = 152
|
||||
|
||||
@JvmStatic
|
||||
fun migrate(context: Application, db: SQLiteDatabase, oldVersion: Int, newVersion: Int) {
|
||||
@@ -2675,6 +2676,16 @@ object SignalDatabaseMigrations {
|
||||
if (oldVersion < MY_STORY_MIGRATION) {
|
||||
MyStoryMigration.migrate(context, db, oldVersion, newVersion)
|
||||
}
|
||||
|
||||
if (oldVersion < STORY_GROUP_TYPES) {
|
||||
db.execSQL(
|
||||
"""
|
||||
UPDATE recipient
|
||||
SET group_type = 4
|
||||
WHERE distribution_list_id IS NOT NULL
|
||||
""".trimIndent()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
|
||||
Reference in New Issue
Block a user