more debug

This commit is contained in:
2026-01-29 02:34:45 -05:00
parent 1ee9b686a2
commit 6f971d1b50
2 changed files with 8 additions and 0 deletions

View File

@@ -37,11 +37,15 @@ export function initializeSocket(server) {
// Join personal room for user-specific notifications
socket.join(`user:${socket.userId}`);
console.log(`📍 ${socket.username} joined personal room: user:${socket.userId}`);
// Handle joining challenge rooms
socket.on('join:challenge', (challengeId) => {
socket.join(`challenge:${challengeId}`);
console.log(`👥 ${socket.username} joined challenge:${challengeId}`);
// Debug: Show all rooms this socket is in
console.log(` Current rooms:`, Array.from(socket.rooms));
});
// Handle leaving challenge rooms