diff --git a/src/org/thoughtcrime/securesms/loki/database/SharedSenderKeysDatabase.kt b/src/org/thoughtcrime/securesms/loki/database/SharedSenderKeysDatabase.kt index 15b415e8e0..548e717011 100644 --- a/src/org/thoughtcrime/securesms/loki/database/SharedSenderKeysDatabase.kt +++ b/src/org/thoughtcrime/securesms/loki/database/SharedSenderKeysDatabase.kt @@ -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 {