diff --git a/CHANGELOG.md b/CHANGELOG.md index 44478806..eb884597 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## [Unreleased] +### Added + +- `getRateLimitStatus` JSON-RPC/CLI command returning the current rate-limit state for the account (active flag, `retryAfterSeconds`, `challengeToken`, `expiresAtEpochSeconds`). Useful for admin UIs, monitoring, and clients that want to query current state without triggering a send. + ### Changed - Send message results now surface server-advised retry time for plain rate-limit (HTTP 413) failures, not only for proof-required challenges. The `retryAfterSeconds` field in JSON-RPC `SendMessageResult` is populated whenever the server sends a `Retry-After` header. The canonical way to distinguish proof-required failures remains `token != null`. Text output includes "retry after N seconds" when known. diff --git a/man/signal-cli.1.adoc b/man/signal-cli.1.adoc index e349a2ad..22b78cfd 100644 --- a/man/signal-cli.1.adoc +++ b/man/signal-cli.1.adoc @@ -1119,6 +1119,20 @@ The challenge token from the failed send attempt. *--captcha* CAPTCHA:: The captcha result, starting with signalcaptcha:// +=== getRateLimitStatus + +Return the current rate-limit state for this account, or an inactive status if no rate limit is active. + +State is tracked from observed send results: the status becomes active when a send fails with a rate-limit error, clears after a successful `submitRateLimitChallenge`, and auto-expires when the server-advised retry-after deadline passes. + +With JSON output the response has the following fields: + +- `active`: boolean, true if a rate-limit window is currently active +- `proofRequired`: boolean, true if a captcha challenge must be solved via `submitRateLimitChallenge` +- `retryAfterSeconds`: seconds remaining until the limit expires (omitted when `active` is false) +- `challengeToken`: the challenge token to pass to `submitRateLimitChallenge` (only present when `proofRequired` is true) +- `expiresAtEpochSeconds`: Unix timestamp when the rate-limit window expires (omitted when `active` is false) + === version Show version information.