mirror of
https://github.com/AsamK/signal-cli.git
synced 2026-05-31 15:20:17 +00:00
Allow JSON-RPC commands without account param if only one account exists
This commit is contained in:
parent
0702159596
commit
210466e7d9
@ -87,7 +87,13 @@ public class SignalJsonRpcCommandHandler {
|
|||||||
return runCommand(objectMapper, params, new CommandRunnerImpl<>(m, jsonRpcCommand));
|
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) {
|
if (manager != null) {
|
||||||
return runCommand(objectMapper, params, new CommandRunnerImpl<>(manager, jsonRpcCommand));
|
return runCommand(objectMapper, params, new CommandRunnerImpl<>(manager, jsonRpcCommand));
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user