Merge pull request #351 from RyanRory/SSK-leave-group-fix

Fix SSK Closed Group Leaving Issue
This commit is contained in:
Niels Andriesse 2020-09-23 16:32:36 +10:00 committed by GitHub
commit 41041071f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,7 +58,8 @@ class SharedSenderKeysDatabase(context: Context, helper: SQLCipherOpenHelper) :
override fun removeAllClosedGroupRatchets(groupPublicKey: String) { override fun removeAllClosedGroupRatchets(groupPublicKey: String) {
val database = databaseHelper.writableDatabase 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> { override fun getAllClosedGroupSenderKeys(groupPublicKey: String): Set<ClosedGroupSenderKey> {