mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Don't retry messages if they fail for another reason than untrusted identity
This commit is contained in:
parent
019efbe22c
commit
2ab8646168
1 changed files with 10 additions and 1 deletions
|
@ -1398,7 +1398,15 @@ public class Manager implements Closeable {
|
||||||
if (!envelope.isReceipt()) {
|
if (!envelope.isReceipt()) {
|
||||||
try {
|
try {
|
||||||
content = decryptMessage(envelope);
|
content = decryptMessage(envelope);
|
||||||
} catch (Exception e) {
|
} catch (org.whispersystems.libsignal.UntrustedIdentityException e) {
|
||||||
|
return;
|
||||||
|
} catch (Exception er) {
|
||||||
|
// All other errors are not recoverable, so delete the cached message
|
||||||
|
try {
|
||||||
|
Files.delete(fileEntry.toPath());
|
||||||
|
} catch (IOException e) {
|
||||||
|
System.err.println("Failed to delete cached message file “" + fileEntry + "”: " + e.getMessage());
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
List<HandleAction> actions = handleMessage(envelope, content, ignoreAttachments);
|
List<HandleAction> actions = handleMessage(envelope, content, ignoreAttachments);
|
||||||
|
@ -1476,6 +1484,7 @@ public class Manager implements Closeable {
|
||||||
System.err.println("Ignoring error: " + e.getMessage());
|
System.err.println("Ignoring error: " + e.getMessage());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (envelope.hasSource()) {
|
if (envelope.hasSource()) {
|
||||||
// Store uuid if we don't have it already
|
// Store uuid if we don't have it already
|
||||||
SignalServiceAddress source = envelope.getSourceAddress();
|
SignalServiceAddress source = envelope.getSourceAddress();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue