feat: add creator verification routes#469
Open
zuru122 wants to merge 20 commits intoStreamFi-x:devfrom
Open
Conversation
Implement full moderation system including: - Ban/timeout users with duration options (1m, 5m, 10m, 1h, permanent) - Delete messages with context menu - Slow mode (3s, 5s, 10s, 30s intervals) - Follower-only chat mode - Link blocking with URL regex detection - Active bans management panel Database changes: - Add chat_bans table with expires_at for timeouts - Add slow_mode_seconds, follower_only_chat, link_blocking to users table API endpoints: - POST /api/streams/chat/ban - ban/timeout users - DELETE /api/streams/chat/ban/[username] - unban users - GET /api/streams/chat/ban - list active bans - PATCH /api/streams/settings - update chat settings - Updated POST /api/streams/chat with enforcement logic UI components: - Right-click context menu on chat messages (stream owner only) - ChatModerationSettings panel in stream manager - Ban list with unban functionality - Settings toggles for follower-only and link blocking Enforcement: - Server-side validation for all moderation rules - 429 responses with Retry-After headers for timeouts - Clear error messages for banned/timed-out users
- Add mocks for permanent ban check - Add mocks for timeout check - Add mocks for slow mode validation - Update combined lookup to include moderation settings
- Remove slow mode mock when slow_mode_seconds is 0 - Add streamer_id to combined lookup mock
…ration feat: Chat Moderation Tools for Streamers
Keep both StreamAccessSettings (access-control) and ChatModerationSettings (dev) in stream manager page, and combine index definitions in schema.sql. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…l-foundation Feat/access control foundation
setStreamData was called without accessType and accessConfig, causing a TS error and silently dropping access-control settings on save. Use a functional state update to spread existing state. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Covers POST and GET handlers across all three import sources (twitch, youtube, json). Includes edge cases for: - invalid source / missing data fields - user rate limit (24h) and DB errors - overwrite_existing flag behaviour - social_links and categories field mapping - twitch token never persisted to DB - youtube ssrf guard - job status polling Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Three pre-existing errors unrelated to the import api: - app/api/users/[username]/route.ts: password_hash destructured intentionally to omit it — suppress no-unused-vars - StreamAccessSettings.tsx: add curly braces to if statements - view-stream.tsx: add curly brace to if statement; suppress no-unused-vars on isCheckingAccess (set but never read) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Replace chained .replace() calls in decodeHTMLEntities with a single-pass regex to prevent double-unescaping (CodeQL high alert) - Add eslint-disable-next-line on stub functions in lib/stream/access.ts where _-prefixed params are intentionally unused pending future issues - Run prettier on files that had format drift Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
feat(routes-f): data import api for onboarding from other platforms
|
@zuru122 is attempting to deploy a commit to the david's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#460
Summary
Adds creator verification API routes under app/api/routes-f/
verification/route.ts and app/api/routes-f/verification/admin/
route.ts.
This PR:
creator’s current verification status: unverified, pending,
verified, or rejected.
request with social_links, reason, and optional id_document_url.
pending.
verification requests.
check using VERIFICATION_ADMIN_USER_IDS or
VERIFICATION_ADMIN_EMAILS.
verification/.
Implementation details:
created on demand by the route helper in app/api/routes-f/
verification/_shared.ts.
optional document URLs.
tests/route.test.ts.