feat/user-blocking #50
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/user-blocking"
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?
- Add user_blocks table (auth/0006) keyed by (blocker_id, blocked_id) with a CHECK preventing self-blocks. - Add db helpers: block_user, unblock_user, did_block, is_blocked_either_way, list_blocked_users; extend search_users to exclude users blocked in either direction. - Add POST /users/{id}/block, POST /users/{id}/unblock with safe same-origin return_to redirects. - Add GET /settings/blocked page listing blocked users with an Unblock action; link from the Settings page Privacy section. - DM page renders a friendly "You can't message @x" notice via WelcomePage when either party blocks the other; sidebar hides DMs with blocked peers. - Refuse top-level message and thread reply sends in DM rooms when either party is blocked. - Surface a Block button in the DM header and in user search results; both confirm before posting. - Tests cover block/unblock round trip, list_blocked_users, and that search_users excludes users blocked in either direction. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>