Skip to content

Commit

Permalink
Merge pull request #127 from pjhcsols/chat
Browse files Browse the repository at this point in the history
[pjhcsols:chat-> weekly] Fix: ChatMessageService
  • Loading branch information
pjhcsols authored Nov 15, 2024
2 parents 44fd1e5 + d2069e4 commit a53763e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit a53763e

Please sign in to comment.