mirror of
https://github.com/AsamK/signal-cli
synced 2025-09-01 20:10:39 +00:00
Fixed potential error if user tries to send endsession
to a group
This commit is contained in:
parent
25a137987b
commit
47b3c86f0e
1 changed files with 7 additions and 7 deletions
|
@ -46,13 +46,7 @@ public class SendCommand implements DbusCommand {
|
|||
return 1;
|
||||
}
|
||||
|
||||
if ((ns.getList("recipient") == null || ns.getList("recipient").size() == 0) && ns.getString("group") == null) {
|
||||
System.err.println("No recipients given");
|
||||
System.err.println("Aborting sending.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (ns.getBoolean("endsession")) {
|
||||
if (ns.getBoolean("endsession") && ns.getList("recipient") != null && ns.getList("recipient").size() > 0) {
|
||||
try {
|
||||
signal.sendEndSessionMessage(ns.<String>getList("recipient"));
|
||||
return 0;
|
||||
|
@ -71,6 +65,12 @@ public class SendCommand implements DbusCommand {
|
|||
}
|
||||
}
|
||||
|
||||
if ((ns.getList("recipient") == null || ns.getList("recipient").size() == 0) && ns.getString("group") == null) {
|
||||
System.err.println("No recipients given");
|
||||
System.err.println("Aborting sending.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
String messageText = ns.getString("message");
|
||||
if (messageText == null) {
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue