Fix getNumTrustedKeys

Andreas Straub created

Change summary

src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java | 6 
1 file changed, 4 insertions(+), 2 deletions(-)

Detailed changes

src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java 🔗

@@ -863,11 +863,13 @@ public class DatabaseBackend extends SQLiteOpenHelper {
 		SQLiteDatabase db = getReadableDatabase();
 		String[] args = {
 				account.getUuid(),
-				name
+				name,
+				String.valueOf(AxolotlService.SQLiteAxolotlStore.Trust.TRUSTED.ordinal())
 		};
 		return DatabaseUtils.queryNumEntries(db, AxolotlService.SQLiteAxolotlStore.IDENTITIES_TABLENAME,
 				AxolotlService.SQLiteAxolotlStore.ACCOUNT + " = ?"
-				+ " AND " + AxolotlService.SQLiteAxolotlStore.NAME + " = ?",
+				+ " AND " + AxolotlService.SQLiteAxolotlStore.NAME + " = ?"
+				+ " AND " + AxolotlService.SQLiteAxolotlStore.TRUSTED + " = ?",
 				args
 		);
 	}