Commit 1ae4c0ac authored by Mahmoud Aglan's avatar Mahmoud Aglan

fix: friendship system + friend invite/challenge lobby

Friendship bugs fixed:
- Accept now uses service key (bypasses RLS that blocked updates)
- Duplicate request prevention (checks both directions)
- Reject uses proper POST action instead of broken DELETE call
- Cleaned up stale duplicate rows in DB

New features:
- Friend invite system: challenge dialog with game/time selection
- Match created as 'friendly' with status 'waiting'
- Opponent sees invite banner (polls every 5s), can accept/decline
- Accept starts the match, both players enter the game
- 2-minute invite expiry
Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent 432f8feb
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment