mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Allow MultiLocalCommands to be called when no local users exist
This commit is contained in:
parent
9944b666b0
commit
be4b683a41
1 changed files with 3 additions and 4 deletions
|
@ -133,16 +133,15 @@ public class App {
|
|||
|
||||
if (username == null) {
|
||||
var usernames = Manager.getAllLocalUsernames(dataPath);
|
||||
if (usernames.size() == 0) {
|
||||
throw new UserErrorException("No local users found, you first need to register or link an account");
|
||||
}
|
||||
|
||||
if (command instanceof MultiLocalCommand) {
|
||||
handleMultiLocalCommand((MultiLocalCommand) command, dataPath, serviceEnvironment, usernames);
|
||||
return;
|
||||
}
|
||||
|
||||
if (usernames.size() > 1) {
|
||||
if (usernames.size() == 0) {
|
||||
throw new UserErrorException("No local users found, you first need to register or link an account");
|
||||
} else if (usernames.size() > 1) {
|
||||
throw new UserErrorException(
|
||||
"Multiple users found, you need to specify a username (phone number) with -u");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue