diff --git a/src/main/java/com/dnd/gongmuin/chat/dto/request/ChatMessageRequest.java b/src/main/java/com/dnd/gongmuin/chat/dto/request/ChatMessageRequest.java index 90654923..3fe88baf 100644 --- a/src/main/java/com/dnd/gongmuin/chat/dto/request/ChatMessageRequest.java +++ b/src/main/java/com/dnd/gongmuin/chat/dto/request/ChatMessageRequest.java @@ -10,6 +10,6 @@ public record ChatMessageRequest( String type, @NotNull(message = "회원 아이디를 입력해주세요.") - Long memberId + Long senderId ) { } diff --git a/src/main/java/com/dnd/gongmuin/chat/service/ChatMessageService.java b/src/main/java/com/dnd/gongmuin/chat/service/ChatMessageService.java index f001e5db..5089b666 100644 --- a/src/main/java/com/dnd/gongmuin/chat/service/ChatMessageService.java +++ b/src/main/java/com/dnd/gongmuin/chat/service/ChatMessageService.java @@ -24,10 +24,10 @@ public ChatMessageResponse saveChatMessage( ChatMessageRequest request, Long chatRoomId ) { - Long memberId = request.memberId(); + Long senderId = request.senderId(); ChatMessage chatMessage = chatMessageRepository.save( - ChatMessageMapper.toChatMessage(request, chatRoomId, memberId)); - log.info("chatRoomId = {}, memberId= {}, chatMessageId= {}", chatRoomId, memberId, chatMessage.getId()); + ChatMessageMapper.toChatMessage(request, chatRoomId, senderId)); + log.info("chatRoomId = {}, senderId= {}, chatMessageId= {}", chatRoomId, senderId, chatMessage.getId()); return ChatMessageMapper.toChatMessageResponse(chatMessage); } }