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.
fork-5.53.8
Greyson Parrelli 2020-10-09 12:16:38 -04:00
rodzic 0ca2c781c3
commit 597d16f566
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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));
}