Skip to content

[CORRUPTED] Synthetic Benchmark PR #1926 - [bench] feat: discord concierge oauth2 integration - #2

Open
amirzaushnizer wants to merge 12 commits into
base_pr_1926_20260621_3494from
corrupted_pr_1926_20260621_3494
Open

[CORRUPTED] Synthetic Benchmark PR #1926 - [bench] feat: discord concierge oauth2 integration#2
amirzaushnizer wants to merge 12 commits into
base_pr_1926_20260621_3494from
corrupted_pr_1926_20260621_3494

Conversation

@amirzaushnizer

Copy link
Copy Markdown
Collaborator

Benchmark PR flowglad#1926

Type: Corrupted (contains bugs)

Original PR Title: [bench] feat: discord concierge oauth2 integration
Original PR Description: Reconstructed for skills benchmark from flowglad#1926
Original PR URL: flowglad#1926

Liam Monaghan and others added 12 commits February 7, 2026 15:49
Replace invite link approach with Discord OAuth2 flow. Users now authorize via Discord to gain channel access, solving the issue of invite links not granting private channel permissions. Implements CSRF token validation, user/guild addition, and per-user channel access via permission overwrites.
… OAuth callback

Eliminates fragile NEXT_REDIRECT string check by computing the redirect
URL inside try/catch and calling redirect() after. Replaces console.log
debug statements with logger.error for the error path.
…aned channels

Channel was being created on button click before OAuth, leaving floating
channels when users abandoned the flow. Now the channel is only created
in the callback after successful authorization.
…l redirect

- Replace raw Drizzle update with updateOrganization tableMethod in OAuth callback
- Re-read org after update to handle concurrent race conditions correctly
- Use window.location.href instead of router.push for external Discord OAuth URL
- Remove unused useRouter import from DiscordConciergeLink
- Log errors in Discord OAuth callback catch block for production debugging
- Add Zod schema validation on Discord token exchange response
- Replace hardcoded Discord API URL with RouteBases.api + Routes.user()
- Remove unsafe type cast in OAuth state test using getdel override
Thread discordUserId through getOrCreateConciergeChannel to
buildWelcomeMessage so the welcome message @mentions the specific
user who joined. This creates an unread notification badge on the
channel, making it visible in their sidebar even if the category
is collapsed. Falls back to @here when no user ID is available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants