Skip to content

Add match result webhook configuration to profile page#738

Open
tetsuo-matsumura wants to merge 1 commit into
mainfrom
feature/match-result-webhooks
Open

Add match result webhook configuration to profile page#738
tetsuo-matsumura wants to merge 1 commit into
mainfrom
feature/match-result-webhooks

Conversation

@tetsuo-matsumura
Copy link
Copy Markdown
Collaborator

Summary

Adds a webhook URL field to the user profile page, allowing players to configure a personal endpoint that receives their match result payload after each game finishes.

  • src/interface/API/MatchResultWebhookAPI.php.ts — new request/response types for the webhook API
  • src/interface/API/UserProfileAPI.php.ts — added matchResultWebhookUrl?: string to the profile response shape
  • src/appConstants.ts — added MATCH_RESULT_WEBHOOK endpoint to URL_END_POINT
  • src/features/api/apiSlice.ts — added setMatchResultWebhook RTK Query mutation (useSetMatchResultWebhookMutation)
  • src/routes/user/profile/index.tsx — webhook section with pre-populated input (synced from profile data via useEffect), save handler with toast feedback, placed after the Patreon section
  • src/routes/user/profile/profile.module.csswebhookSection and webhookInputRow styles matching the existing Patreon/Metafy card style

Backend PR

This is the frontend half of the feature. The backend changes (new API endpoint, database migration, match-end delivery logic, SSRF validation) are in:

Talishar/Talishar#1391 — Add user-configurable match result webhooks

The backend PR also includes a small update to UserProfileAPI.php to return matchResultWebhookUrl in the profile response, which is what pre-populates the input field here.

Test plan

  • Load /user/profile while logged in — webhook input renders in the left column after Patreon
  • If a webhook URL was previously saved, the input is pre-populated
  • Enter a valid URL and click Save — toast confirms success
  • Clear the input and click Save — toast confirms webhook cleared
  • Backend returns a validation error (e.g. bare IP, bad scheme) — error message appears as a toast
  • Network error — generic error toast shown, page does not break
  • Verify layout on mobile (≤575px) — input and button stack vertically

🤖 Generated with Claude Code

Adds a webhook URL field to the user profile page. Players can save a
public https URL that will receive their match result payload after each
game finishes. Saving an empty value clears the webhook.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant