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;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((ns.getList("recipient") == null || ns.getList("recipient").size() == 0) && ns.getString("group") == null) {
|
if (ns.getBoolean("endsession") && ns.getList("recipient") != null && ns.getList("recipient").size() > 0) {
|
||||||
System.err.println("No recipients given");
|
|
||||||
System.err.println("Aborting sending.");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ns.getBoolean("endsession")) {
|
|
||||||
try {
|
try {
|
||||||
signal.sendEndSessionMessage(ns.<String>getList("recipient"));
|
signal.sendEndSessionMessage(ns.<String>getList("recipient"));
|
||||||
return 0;
|
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");
|
String messageText = ns.getString("message");
|
||||||
if (messageText == null) {
|
if (messageText == null) {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue