fix: use correct signal-cli default port 8080 and robust connectivity check
- Change default noise-signal-cli-address to port 8080 (signal-cli's --http default) - Replace getVersion (not a valid JSON-RPC method) with noisePing probe - noise-rpc-check now returns t on any valid JSON-RPC response - Update README to reflect correct default port
This commit is contained in:
@@ -19,9 +19,10 @@
|
||||
:group 'comm
|
||||
:prefix "noise-")
|
||||
|
||||
(defcustom noise-signal-cli-address "http://localhost:9128"
|
||||
(defcustom noise-signal-cli-address "http://localhost:8080"
|
||||
"Base URL of the signal-cli JSON-RPC daemon.
|
||||
Format: http://HOST:PORT"
|
||||
Format: http://HOST:PORT
|
||||
The default port is 8080, matching signal-cli's `--http` default."
|
||||
:type 'string
|
||||
:group 'noise)
|
||||
|
||||
@@ -30,8 +31,9 @@ Format: http://HOST:PORT"
|
||||
"Check connectivity to the signal-cli JSON-RPC daemon."
|
||||
(interactive)
|
||||
(condition-case err
|
||||
(let ((version (noise-rpc-check)))
|
||||
(message "signal-cli connected (version %s)" version))
|
||||
(progn
|
||||
(noise-rpc-check)
|
||||
(message "signal-cli connected at %s" noise-signal-cli-address))
|
||||
(noise-rpc-error
|
||||
(message "Error: %s" (cdr err)))))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user