diff --git a/src/main/java/com/example/CatchStudy/service/ChatService.java b/src/main/java/com/example/CatchStudy/service/ChatService.java index a8d1c6b..4d3202c 100644 --- a/src/main/java/com/example/CatchStudy/service/ChatService.java +++ b/src/main/java/com/example/CatchStudy/service/ChatService.java @@ -105,7 +105,7 @@ public MessageResponseDto createMessage(long chatRoomId, MessageRequestDto messa @EventListener public void handleSessionConnect(SessionConnectEvent event) { - long chatRoomId = Long.parseLong((String) event.getMessage().getHeaders().get("simpDestination")); + long chatRoomId = Long.parseLong((String) event.getMessage().getHeaders().get("chatRoomId")); long userId = usersService.getCurrentUserId(); List userList = chatRoomMap.get(chatRoomId); @@ -117,7 +117,7 @@ public void handleSessionConnect(SessionConnectEvent event) { @EventListener public void handleSessionDisconnect(SessionDisconnectEvent event) { - long chatRoomId = Long.parseLong((String) event.getMessage().getHeaders().get("simpDestination")); + long chatRoomId = Long.parseLong((String) event.getMessage().getHeaders().get("chatRoomId")); long userId = usersService.getCurrentUserId(); List userList = chatRoomMap.get(chatRoomId);