From d2069e403b95a0d6351800c3dabf71b0d02c969d Mon Sep 17 00:00:00 2001 From: pjhcsols Date: Fri, 15 Nov 2024 20:44:30 +0900 Subject: [PATCH] =?UTF-8?q?Fix:[kakao-tech-campus-2nd-step3#28]=20ChatMess?= =?UTF-8?q?ageService=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/helpmeCookies/chat/service/ChatMessageService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/helpmeCookies/chat/service/ChatMessageService.java b/src/main/java/com/helpmeCookies/chat/service/ChatMessageService.java index c74f852..f056112 100644 --- a/src/main/java/com/helpmeCookies/chat/service/ChatMessageService.java +++ b/src/main/java/com/helpmeCookies/chat/service/ChatMessageService.java @@ -40,7 +40,7 @@ public ChatMessage saveMessage(Long chatRoomId, ChatMessageDto messageDto) { ChatRoom chatRoom = chatRoomRepository.findById(chatRoomId) .orElseThrow(() -> new RuntimeException("채팅방을 찾을 수 없습니다.")); - User sender = userRepository.findByEmail(messageDto.getSender()) + User sender = userService.findByEmail(messageDto.getSender()) .orElseThrow(() -> new RuntimeException("사용자를 찾을 수 없습니다.")); ChatMessage message = new ChatMessage(chatRoom, sender, messageDto.getContent(), messageDto.getMessageType());