|
|
|
@ -1223,16 +1223,13 @@ function updateToSessionSchemaVersion30(currentVersion: number, db: BetterSqlite
|
|
|
|
`ALTER TABLE ${CONVERSATIONS_TABLE} ADD COLUMN lastDisappearingMessageChangeTimestamp INTEGER DEFAULT 0;`
|
|
|
|
`ALTER TABLE ${CONVERSATIONS_TABLE} ADD COLUMN lastDisappearingMessageChangeTimestamp INTEGER DEFAULT 0;`
|
|
|
|
).run();
|
|
|
|
).run();
|
|
|
|
|
|
|
|
|
|
|
|
db.prepare(
|
|
|
|
db.prepare(`ALTER TABLE ${CONVERSATIONS_TABLE} ADD COLUMN hasOutdatedClient TEXT;`).run();
|
|
|
|
`ALTER TABLE ${CONVERSATIONS_TABLE} ADD COLUMN hasOutdatedClient BOOLEAN DEFAULT false;`
|
|
|
|
|
|
|
|
).run();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// same value in ts/util/releaseFeature.ts but we cannot import since window doesn't exist yet.
|
|
|
|
|
|
|
|
// TODO update to agreed value between platforms
|
|
|
|
// TODO update to agreed value between platforms
|
|
|
|
const featureReleaseTimestamp = 1677574800000; // unix 28/02/2023 09:00
|
|
|
|
const disappearingMessagesV2ReleaseTimestamp = 1677488400000; // unix 27/02/2023 09:00
|
|
|
|
|
|
|
|
|
|
|
|
// support disppearing messages legacy mode until after the platform agreed timestamp
|
|
|
|
// support disppearing messages legacy mode until after the platform agreed timestamp
|
|
|
|
if (Date.now() < featureReleaseTimestamp) {
|
|
|
|
if (Date.now() < disappearingMessagesV2ReleaseTimestamp) {
|
|
|
|
db.prepare(
|
|
|
|
db.prepare(
|
|
|
|
`UPDATE ${CONVERSATIONS_TABLE} SET
|
|
|
|
`UPDATE ${CONVERSATIONS_TABLE} SET
|
|
|
|
expirationType = $expirationType
|
|
|
|
expirationType = $expirationType
|
|
|
|
|