mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 02:20:39 +00:00
Improve JSON-RPC subscribeReceive method with subscription id
This commit is contained in:
parent
e5a8cdb056
commit
be0993c5d8
9 changed files with 158 additions and 43 deletions
|
@ -76,6 +76,22 @@ The `method` field is the command name and the parameters can be sent as the `pa
|
|||
|
||||
`--attachment ATTACH` becomes `"attachment":"ATTACH"`
|
||||
|
||||
=== Additional JSON-RPC commands
|
||||
|
||||
For receiving message additional commands are provided in JSON-RPC mode with `--receive-mode=manual`.
|
||||
|
||||
==== subscribeReceive
|
||||
|
||||
Tells the daemon to start receiving messages, returns the subscription id as a single integer value in the result.
|
||||
|
||||
==== unsubscribeReceive
|
||||
|
||||
Stop a previous subscription for receiving messages.
|
||||
|
||||
Params:
|
||||
|
||||
- `subscription`: the subscription id returned by `subscribeReceive`
|
||||
|
||||
== Examples
|
||||
|
||||
REQUEST: `{"jsonrpc":"2.0","method":"listGroups","id":"5"}` RESPONSE: `{"jsonrpc":"2.0","result":[...],"id":"5"}`
|
||||
|
|
|
@ -8,7 +8,7 @@ vim:set ts=4 sw=4 tw=82 noet:
|
|||
|
||||
== Name
|
||||
|
||||
signal-cli - A commandline and dbus interface for the Signal messenger
|
||||
signal-cli - A commandline interface for the Signal messenger
|
||||
|
||||
== Synopsis
|
||||
|
||||
|
@ -20,7 +20,7 @@ signal-cli is a commandline interface for libsignal-service-java.
|
|||
It supports registering, verifying, sending and receiving messages.
|
||||
For registering you need a phone number where you can receive SMS or incoming calls.
|
||||
signal-cli was primarily developed to be used on servers to notify admins of important events.
|
||||
For this use-case, it has a dbus interface, that can be used to send messages from any programming language that has dbus bindings.
|
||||
For this use-case, it has a dbus and a JSON-RPC interface, that can be used to send messages from other programs.
|
||||
|
||||
For some functionality the Signal protocol requires that all messages have been received from the server.
|
||||
The `receive` command should be regularly executed.
|
||||
|
@ -54,8 +54,9 @@ This flag must not be given for the `link` command.
|
|||
It is optional for the `daemon` command.
|
||||
For all other commands it is only optional if there is exactly one local user in the config directory.
|
||||
|
||||
*--service-environment* ENVIRONMENT
|
||||
*--service-environment* ENVIRONMENT::
|
||||
Choose the server environment to use:
|
||||
|
||||
- `live` (default)
|
||||
- `staging`
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue