Skip to content

Commit

Permalink
Merge pull request #381 from boostcampwm2023/BE-serverFix-#380
Browse files Browse the repository at this point in the history
[BE] 채팅방 중복 나감처리 해결
  • Loading branch information
koomin1227 authored Dec 7, 2023
2 parents dfa89bf + 96498e3 commit c95204d
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 c95204d

Please sign in to comment.