mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Use exit 4 when sending a single recipient message fails due to untrusted identity key
Fixes #88
This commit is contained in:
parent
e1134d832a
commit
06404667a1
6 changed files with 57 additions and 25 deletions
|
@ -66,6 +66,9 @@ public class SendCommand implements DbusCommand {
|
|||
} catch (AssertionError e) {
|
||||
handleAssertionError(e);
|
||||
return 1;
|
||||
} catch (Signal.Error.UntrustedIdentity e) {
|
||||
System.err.println("Failed to send message: " + e.getMessage());
|
||||
return 4;
|
||||
} catch (DBusExecutionException e) {
|
||||
System.err.println("Failed to send message: " + e.getMessage());
|
||||
return 2;
|
||||
|
@ -118,6 +121,9 @@ public class SendCommand implements DbusCommand {
|
|||
} catch (AssertionError e) {
|
||||
handleAssertionError(e);
|
||||
return 1;
|
||||
} catch (Signal.Error.UntrustedIdentity e) {
|
||||
System.err.println("Failed to send message: " + e.getMessage());
|
||||
return 4;
|
||||
} catch (DBusExecutionException e) {
|
||||
System.err.println("Failed to send note to self message: " + e.getMessage());
|
||||
return 2;
|
||||
|
@ -134,6 +140,9 @@ public class SendCommand implements DbusCommand {
|
|||
} catch (UnknownObject e) {
|
||||
System.err.println("Failed to find dbus object, maybe missing the -u flag: " + e.getMessage());
|
||||
return 1;
|
||||
} catch (Signal.Error.UntrustedIdentity e) {
|
||||
System.err.println("Failed to send message: " + e.getMessage());
|
||||
return 4;
|
||||
} catch (DBusExecutionException e) {
|
||||
System.err.println("Failed to send message: " + e.getMessage());
|
||||
return 2;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue