Skip to content

Commit 81c2f8e

Browse files
committed
Feat: chat 응답값
1 parent f9b31f0 commit 81c2f8e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/cmf/commitField/domain/chat/chatMessage/service/ChatMessageServiceImpl.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public ChatMsgResponse sendMessage(ChatMsgRequest message, Long userId, Long roo
4444
ChatRoom chatRoom = chatRoomRepository.findChatRoomById(roomId)
4545
.orElseThrow(() -> new CustomException(ErrorCode.NOT_FOUND_ROOM));
4646

47+
//채팅 메세지 생성
4748
ChatMsg chatMsg = ChatMsg.builder()
4849
.message(message.getMessage())
4950
.createdAt(LocalDateTime.now())
@@ -52,6 +53,7 @@ public ChatMsgResponse sendMessage(ChatMsgRequest message, Long userId, Long roo
5253
.build();
5354

5455
// Response message
56+
//응답 값으로 변환
5557
ChatMsgResponse response = ChatMsgResponse.builder()
5658
.roomId(roomId)
5759
.from(findUser.getUsername()) // nickname 대신 username 사용

0 commit comments

Comments
 (0)