Skip to content

Commit

Permalink
[BE] Fix : 채팅방 나가기 disconnect 처리
Browse files Browse the repository at this point in the history
  • Loading branch information
namewhat99 committed Dec 7, 2023
1 parent dfa89bf commit 96498e3
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions BE/src/chat/chats.gateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,18 +113,4 @@ export class ChatsGateway implements OnGatewayConnection, OnGatewayDisconnect {
'ChatsGateway',
);
}

@SubscribeMessage('leave-room')
leaveRoom(
@MessageBody() message: object,
@ConnectedSocket() client: ChatWebSocket,
) {
const roomId = message['room_id'];
const room = this.rooms.get(roomId);
room.delete(client);
if (room.size === 0) {
this.rooms.delete(roomId);
}
console.log(this.rooms);
}
}

0 comments on commit 96498e3

Please sign in to comment.