mirror of
https://github.com/AsamK/signal-cli.git
synced 2026-05-09 11:50:42 +00:00
Adds a read-only query returning the most recent rate-limit state
observed from send results. Callers can check whether the account is
currently rate-limited, how long until retry, and whether a captcha
challenge is required — without having to trigger a send and inspect
the response, and without having to reconstruct state themselves.
Useful for:
- Admin UIs that want to display current rate-limit state on load
- Monitoring/alerting (poll for active rate limits)
- Clients that restart and would otherwise lose tracked state
The status is tracked in-memory on the Manager: updated whenever a
SendMessageResult reports a rate-limit failure, cleared after a
successful captcha submission, and auto-expires when the retry-after
window elapses (getRateLimitStatus returns active=false once the
current time is past expiresAtEpochSeconds).
JSON-RPC response shape:
{
"active": bool,
"proofRequired": bool,
"retryAfterSeconds": long, // omitted if not active
"challengeToken": string, // omitted unless proofRequired
"expiresAtEpochSeconds": long // omitted if not active
}
D-Bus is not updated to expose this state; DbusManagerImpl returns
inactive as a stub since D-Bus clients already observe rate-limit state
via send results.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>