mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 00:37:47 +00:00
Handle migration case where recipient_ids is completely empty
No idea how a DB is in that state, but apparently it's possible Fixes #6850 // FREEBIE
This commit is contained in:
parent
9a78615991
commit
cb4303ac23
@ -922,10 +922,10 @@ public class DatabaseFactory {
|
||||
if (resolved != null && resolved.moveToFirst()) {
|
||||
String address = resolved.getString(0);
|
||||
addresses[i] = DelimiterUtil.escape(numberMigrator.migrate(address), ' ');
|
||||
} else if (recipientIds[i].equals("-1")) {
|
||||
} else if (TextUtils.isEmpty(recipientIds[i]) || recipientIds[i].equals("-1")) {
|
||||
addresses[i] = "Unknown";
|
||||
} else {
|
||||
throw new AssertionError("Unable to resolve: " + recipientIds[i]);
|
||||
throw new AssertionError("Unable to resolve: " + recipientIds[i] + ", recipientIdsList: '" + recipientIdsList + "'");
|
||||
}
|
||||
|
||||
if (resolved != null) resolved.close();
|
||||
@ -995,10 +995,10 @@ public class DatabaseFactory {
|
||||
if (resolved != null && resolved.moveToFirst()) {
|
||||
String address = resolved.getString(0);
|
||||
addresses[i] = DelimiterUtil.escape(numberMigrator.migrate(address), ' ');
|
||||
} else if (recipientIds[i].equals("-1")) {
|
||||
} else if (TextUtils.isEmpty(recipientIds[i]) || recipientIds[i].equals("-1")) {
|
||||
addresses[i] = "Unknown";
|
||||
} else {
|
||||
throw new AssertionError("Unable to resolve: " + recipientIds[i]);
|
||||
throw new AssertionError("Unable to resolve: " + recipientIds[i] + ", recipientIdsList: '" + recipientIdsList + "'");
|
||||
}
|
||||
|
||||
if (resolved != null) resolved.close();
|
||||
|
Loading…
x
Reference in New Issue
Block a user