mirror of
https://github.com/aljazceru/signal-cli-rest-api.git
synced 2025-12-19 15:44:28 +01:00
@@ -107,7 +107,7 @@ func (r *JsonRpc2Client) getRaw(command string, account *string, args interface{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Debug("full command: ", string(fullCommandBytes))
|
log.Debug("json-rpc command: ", string(fullCommandBytes))
|
||||||
|
|
||||||
_, err = r.conn.Write([]byte(string(fullCommandBytes) + "\n"))
|
_, err = r.conn.Write([]byte(string(fullCommandBytes) + "\n"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -124,6 +124,10 @@ func (r *JsonRpc2Client) getRaw(command string, account *string, args interface{
|
|||||||
if resp.Err.Code != 0 {
|
if resp.Err.Code != 0 {
|
||||||
return "", errors.New(resp.Err.Message)
|
return "", errors.New(resp.Err.Message)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.Debug("json-rpc command response message: ", string(resp.Result))
|
||||||
|
log.Debug("json-rpc response error: ", string(resp.Err.Message))
|
||||||
|
|
||||||
return string(resp.Result), nil
|
return string(resp.Result), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user