mirror of
https://github.com/oxen-io/session-android.git
synced 2025-06-08 05:08:34 +00:00
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.
This commit is contained in:
parent
0ca2c781c3
commit
597d16f566
@ -1079,7 +1079,7 @@ public class RecipientDatabase extends Database {
|
|||||||
.flatMap(Stream::of)
|
.flatMap(Stream::of)
|
||||||
.toArray(String[]::new);
|
.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()) {
|
while (cursor != null && cursor.moveToNext()) {
|
||||||
out.add(getRecipientSettings(context, cursor));
|
out.add(getRecipientSettings(context, cursor));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user