@ -1736,6 +1736,7 @@ function updateToSessionSchemaVersion34(currentVersion: number, db: BetterSqlite
);
}
}
// endregion
// region Disappearing Messages Private Conversations
@ -1806,7 +1807,7 @@ function updateToSessionSchemaVersion34(currentVersion: number, db: BetterSqlite
);
}else{
console.log(
'===================== contacts config config wrapper dump found ======================='
'===================== contacts config wrapper dump not found ======================='
);
}
}
@ -1815,11 +1816,76 @@ function updateToSessionSchemaVersion34(currentVersion: number, db: BetterSqlite
// endregion
// region Disappearing Messages Groups
db.prepare(
`UPDATE ${CONVERSATIONS_TABLE} SET
constgroupConversationsInfo=db
.prepare(
`UPDATE ${CONVERSATIONS_TABLE} SET
expirationType=$expirationType
WHEREtype='group'ANDidLIKE'05%'ANDexpireTimer>0;`
).run({expirationType:'deleteAfterSend'});
)
.run({expirationType:'deleteAfterSend'});
if(groupConversationsInfo.changes){
// this filter is based on the `isLegacyGroupToStoreInWrapper` function. Note, it has been expanded to check if disappearing messages is on
constlegacyGroupsToWriteInWrapper=db
.prepare(
`SELECT * FROM ${CONVERSATIONS_TABLE} WHERE type = 'group' AND active_at > 0 AND id LIKE '05%' AND NOT isKickedFromGroup AND NOT left AND expirationType = 'deleteAfterSend' AND expireTimer > 0;`