Ensure one row per recipient in getRecipientSettingsForSync().

Technically there's no unique constraint in ThreadDatabase to guarantee
only one thread per recipient. We saw a crash that indicated that one
user has two threads for the same recipient. That's not true for any of
my devices. Still, best to play it safe here while we try to figure out
why this is happening.
master
Greyson Parrelli 2020-10-09 12:16:38 -04:00
parent 0ca2c781c3
commit 597d16f566
1 changed files with 1 additions and 1 deletions

View File

@ -1079,7 +1079,7 @@ public class RecipientDatabase extends Database {
.flatMap(Stream::of)
.toArray(String[]::new);
try (Cursor cursor = db.query(table, columns, query, args, null, null, null)) {
try (Cursor cursor = db.query(table, columns, query, args, TABLE_NAME + "." + ID, null, null)) {
while (cursor != null && cursor.moveToNext()) {
out.add(getRecipientSettings(context, cursor));
}