feat(room): per-channel slowmode (LC-534) #507
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/LC-534-slowmode"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Second build from the Round 3 shortlist (LC-531): per-channel slowmode.
What it does: a room manager sets a minimum interval between a member's posts (Off / 5s / 10s / 30s / 1m) from the room manage page. Posting faster returns a 429 with the seconds remaining. Moderators are exempt, and the setting is written to the mod log.
How it works: a new
rooms.slowmode_secondscolumn (chat migration 0082, default 0 = off) and aRateLimits::check_cooldownminimum-interval limiter that reuses the existing DashMap under a distinct "slow" kind tag. Enforced inpost_messageafter the posting-policy gate, and only when enabled, so non-slowmode rooms pay nothing. Presets are capped at 60s (the limiter window) so the shared sweep never drops an active cooldown early.Four small commits: column + limiter, enforcement, manage control, tests.
Verification - driven end-to-end: an HTTP integration test asserts a plain member's second rapid post is 429'd, a room with slowmode off allows rapid posts, and a room moderator is exempt. Plus a limiter unit test.
just test+just test-saas+just checkgreen.Moderation note: standard anti-flood control, manager-configurable, mod-exempt, audit-logged. No new privacy surface.
Not operator-visible (no env/config change; the migration auto-applies).
Generated with Claude Code.
Adds a Slowmode card to the room manage page: a manager picks Off / 5s / 10s / 30s / 1m, saved via POST /room/{id}/slowmode. Same require_can_manage authorization as the posting policy, validated against a fixed preset list (all <= 60s to respect the limiter window), and written to the mod log. get_page now loads the current value. i18n en + es. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NTRhc4n7A2uB2Y5PHV2ewL