mirror of
https://github.com/AsamK/signal-cli
synced 2025-09-01 20:10:39 +00:00
Display error if trying to send endsession
to a group
This commit is contained in:
parent
47b3c86f0e
commit
57c35cb8cc
1 changed files with 6 additions and 6 deletions
|
@ -46,6 +46,12 @@ public class SendCommand implements DbusCommand {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((ns.getList("recipient") == null || ns.getList("recipient").size() == 0) && (ns.getBoolean("endsession") || ns.getString("group") == null)) {
|
||||||
|
System.err.println("No recipients given");
|
||||||
|
System.err.println("Aborting sending.");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (ns.getBoolean("endsession") && ns.getList("recipient") != null && ns.getList("recipient").size() > 0) {
|
if (ns.getBoolean("endsession") && ns.getList("recipient") != null && ns.getList("recipient").size() > 0) {
|
||||||
try {
|
try {
|
||||||
signal.sendEndSessionMessage(ns.<String>getList("recipient"));
|
signal.sendEndSessionMessage(ns.<String>getList("recipient"));
|
||||||
|
@ -65,12 +71,6 @@ 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