signal-cli-rest-api
signal-cli-rest-api copied to clipboard
Add support of extra flags for `receive` command
Feature Request
The receive endpoint now only supports the timeout argument, but the CLI also provides the following configs:
usage: signal-cli receive [-h] [-t TIMEOUT] [--max-messages MAX_MESSAGES] [--ignore-attachments] [--ignore-stories] [--send-read-receipts]
named arguments:
-h, --help show this help message and exit
-t TIMEOUT, --timeout TIMEOUT
Number of seconds to wait for new messages (negative values disable timeout)
--max-messages MAX_MESSAGES
Maximum number of messages to receive, before returning.
--ignore-attachments Don’t download attachments of received messages.
--ignore-stories Don’t receive story messages from the server.
--send-read-receipts Send read receipts for all incoming data messages (in addition to the default delivery receipts)
It would be great to add support for the other flags as well. IMO --ignore flags are especially helpful with the auto receive feature.
When my service which uses REST API isn't up for a long time, and then I try to receive messages, I get {"error":"process killed as timeout reached"} and messages are lost. I would hope --max-messages analog would help.
When my service which uses REST API isn't up for a long time, and then I try to receive messages, I get
{"error":"process killed as timeout reached"}and messages are lost. I would hope--max-messagesanalog would help.
Currently, --max-messages isn't exposed via the REST API. But specifying a long timeout (e.g: GET /v1/receive?timeout=60) should work too.