remove the ratchet for only the group that the use left

This commit is contained in:
Ryan ZHAO 2020-09-23 15:25:51 +10:00
parent cf4a10cea8
commit 308dafcdc4

View File

@ -58,7 +58,8 @@ class SharedSenderKeysDatabase(context: Context, helper: SQLCipherOpenHelper) :
override fun removeAllClosedGroupRatchets(groupPublicKey: String) {
val database = databaseHelper.writableDatabase
database.delete(closedGroupRatchetTable, null, null)
val query = "${Companion.closedGroupPublicKey} = ?"
database.delete(closedGroupRatchetTable, query, arrayOf( groupPublicKey ))
}
override fun getAllClosedGroupSenderKeys(groupPublicKey: String): Set<ClosedGroupSenderKey> {