Skip to content

Commit

Permalink
[COZY-449] fix: 쪽지 내용 앞뒤 공백 trim 처리 (#217)
Browse files Browse the repository at this point in the history
* [COZY-449] fix: 쪽지 작성 시 content의 앞뒤 공백을 삭제하고 db에 저장한다

* [COZY-449] fix: 쪽지방 목록 반환 시 lastContent의 앞뒤 공백을 삭제 처리 후 반환한다.

* [COZY-449] fix: trim() 처리 위치를 수정한다
  • Loading branch information
veronees authored Dec 14, 2024
1 parent 5e1b679 commit 3951183
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ private void checkBlockedMember(Member sender, Long recipientId) {
}

private void saveChat(ChatRoom chatRoom, Member sender, String content) {
Chat chat = ChatConverter.toEntity(chatRoom, sender, content);
Chat chat = ChatConverter.toEntity(chatRoom, sender, content.trim());
chatRepository.save(chat);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static ChatRoomDetailResponseDTO toChatRoomDetailResponseDTO(String nickn
Long chatRoomId, Integer persona, Long memberId, boolean hasNewChat) {
return ChatRoomDetailResponseDTO.builder()
.nickname(nickname)
.lastContent(content)
.lastContent(content.trim())
.chatRoomId(chatRoomId)
.persona(persona)
.memberId(memberId)
Expand Down

0 comments on commit 3951183

Please sign in to comment.