mirror of
https://github.com/aljazceru/signal-cli.git
synced 2025-12-19 15:14:21 +01:00
Fix potential crash that could happen when legacy thread.id is null or empty
This commit is contained in:
@@ -203,6 +203,9 @@ public class SignalAccount {
|
|||||||
LegacyJsonThreadStore threadStore = jsonProcessor.convertValue(threadStoreNode, LegacyJsonThreadStore.class);
|
LegacyJsonThreadStore threadStore = jsonProcessor.convertValue(threadStoreNode, LegacyJsonThreadStore.class);
|
||||||
// Migrate thread info to group and contact store
|
// Migrate thread info to group and contact store
|
||||||
for (ThreadInfo thread : threadStore.getThreads()) {
|
for (ThreadInfo thread : threadStore.getThreads()) {
|
||||||
|
if (thread.id == null || thread.id.isEmpty()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
ContactInfo contactInfo = contactStore.getContact(new SignalServiceAddress(null, thread.id));
|
ContactInfo contactInfo = contactStore.getContact(new SignalServiceAddress(null, thread.id));
|
||||||
if (contactInfo != null) {
|
if (contactInfo != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user