feat(dashboard): add unread count for match chats

Track unread messages in match chats and display count badge:
- Schema: Add user1LastReadAt/user2LastReadAt to Match model
- Backend: Calculate unreadCount in dashboard API
- Socket: Update lastReadAt when user joins match room
- Frontend: Display red badge with unread count on match avatar
This commit is contained in:
Radosław Gierwiało
2025-11-21 21:46:00 +01:00
parent 2c0620db6a
commit 78280ca8d8
6 changed files with 121 additions and 15 deletions

View File

@@ -0,0 +1,4 @@
-- AlterTable
ALTER TABLE "matches" ADD COLUMN "user1_last_read_at" TIMESTAMP(3),
ADD COLUMN "user2_last_read_at" TIMESTAMP(3),
ALTER COLUMN "slug" DROP DEFAULT;