mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
parent
5b5827f885
commit
333aacf4ab
2 changed files with 10 additions and 1 deletions
|
@ -84,13 +84,18 @@ public class LegacyRecipientStore2 {
|
||||||
}).collect(Collectors.toMap(Recipient::getRecipientId, r -> r));
|
}).collect(Collectors.toMap(Recipient::getRecipientId, r -> r));
|
||||||
|
|
||||||
recipientStore.addLegacyRecipients(recipients);
|
recipientStore.addLegacyRecipients(recipients);
|
||||||
Files.delete(file.toPath());
|
|
||||||
} catch (FileNotFoundException e) {
|
} catch (FileNotFoundException e) {
|
||||||
// nothing to migrate
|
// nothing to migrate
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
logger.warn("Failed to load recipient store", e);
|
logger.warn("Failed to load recipient store", e);
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
|
Files.delete(file.toPath());
|
||||||
|
} catch (IOException e) {
|
||||||
|
logger.warn("Failed to load recipient store", e);
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private record Storage(List<Recipient> recipients, long lastId) {
|
private record Storage(List<Recipient> recipients, long lastId) {
|
||||||
|
|
|
@ -52,6 +52,10 @@ public class LegacySenderKeySharedStore {
|
||||||
}
|
}
|
||||||
|
|
||||||
senderKeyStore.addLegacySenderKeysShared(sharedSenderKeys);
|
senderKeyStore.addLegacySenderKeysShared(sharedSenderKeys);
|
||||||
|
} catch (IOException e) {
|
||||||
|
logger.info("Failed to load shared sender key store, ignoring", e);
|
||||||
|
}
|
||||||
|
try {
|
||||||
Files.delete(file.toPath());
|
Files.delete(file.toPath());
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
logger.info("Failed to load shared sender key store, ignoring", e);
|
logger.info("Failed to load shared sender key store, ignoring", e);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue