mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 02:20:39 +00:00
Allow JSON-RPC commands without account param if only one account exists
This commit is contained in:
parent
0702159596
commit
210466e7d9
1 changed files with 7 additions and 1 deletions
|
@ -87,7 +87,13 @@ public class SignalJsonRpcCommandHandler {
|
|||
return runCommand(objectMapper, params, new CommandRunnerImpl<>(m, jsonRpcCommand));
|
||||
}
|
||||
|
||||
final var manager = getManagerFromParams(params);
|
||||
var manager = getManagerFromParams(params);
|
||||
if (manager == null) {
|
||||
final var managers = c.getManagers();
|
||||
if (managers.size() == 1) {
|
||||
manager = managers.get(0);
|
||||
}
|
||||
}
|
||||
if (manager != null) {
|
||||
return runCommand(objectMapper, params, new CommandRunnerImpl<>(manager, jsonRpcCommand));
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue