Support for read receipts

// FREEBIE
This commit is contained in:
Moxie Marlinspike
2017-09-15 22:38:53 -07:00
parent 65124fd1f2
commit cb9bc9659b
46 changed files with 471 additions and 451 deletions

View File

@@ -106,7 +106,8 @@ public class DatabaseFactory {
private static final int PROFILES = 41;
private static final int PROFILE_SHARING_APPROVAL = 42;
private static final int UNSEEN_NUMBER_OFFER = 43;
private static final int DATABASE_VERSION = 43;
private static final int READ_RECEIPTS = 44;
private static final int DATABASE_VERSION = 44;
private static final String DATABASE_NAME = "messages.db";
private static final Object lock = new Object();
@@ -1321,6 +1322,12 @@ public class DatabaseFactory {
db.execSQL("ALTER TABLE thread ADD COLUMN has_sent INTEGER DEFAULT 0");
}
if (oldVersion < READ_RECEIPTS) {
db.execSQL("ALTER TABLE sms ADD COLUMN read_receipt_count INTEGER DEFAULT 0");
db.execSQL("ATLER TABLE mms ADD COLUMN read_receipt_count INTEGER DEFAULT 0");
db.execSQL("ALTER TABLE thread ADD COLUMN read_receipt_count INTEGER DEFAULT 0");
}
db.setTransactionSuccessful();
db.endTransaction();
}