mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Extend logging in JsonRpcReader
This commit is contained in:
parent
e495afcff5
commit
e7a4bc5ef1
1 changed files with 5 additions and 4 deletions
|
@ -41,13 +41,14 @@ public class JsonRpcReader {
|
|||
JsonRpcMessage message = readMessage();
|
||||
if (message == null) break;
|
||||
|
||||
if (message instanceof JsonRpcRequest) {
|
||||
final var response = handleRequest(requestHandler, (JsonRpcRequest) message);
|
||||
if (message instanceof final JsonRpcRequest jsonRpcRequest) {
|
||||
logger.debug("Received json rpc request, method: " + jsonRpcRequest.method);
|
||||
final var response = handleRequest(requestHandler, jsonRpcRequest);
|
||||
if (response != null) {
|
||||
jsonRpcSender.sendResponse(response);
|
||||
}
|
||||
} else if (message instanceof JsonRpcResponse) {
|
||||
responseHandler.accept((JsonRpcResponse) message);
|
||||
} else if (message instanceof JsonRpcResponse jsonRpcResponse) {
|
||||
responseHandler.accept(jsonRpcResponse);
|
||||
} else {
|
||||
final var responseList = ((JsonRpcBulkMessage) message).getMessages().stream().map(jsonNode -> {
|
||||
final JsonRpcRequest request;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue