-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[COZY-449] fix: 쪽지 내용 앞뒤 공백 trim 처리 #217
Conversation
리뷰해드려요~
추가적으로 제안하고 싶은 것은 없습니다. 위에서 변경된 부분은 코드의 일반적인 유지보수 및 개선 사항으로 보입니다. |
@@ -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()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
조회에서 trim 처리는 db 밀게되면 지우겠습니다
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
출시전에 지우면 되겠네여
리뷰해드려요~ChatCommandService.java
private void saveChat(ChatRoom chatRoom, Member sender, String content) {
content = content.trim();
content = content.replaceAll("[^a-zA-Z0-9가-힣]", ""); // 정규화 코드 추가
Chat chat = ChatConverter.toEntity(chatRoom, sender, content);
chatRepository.save(chat);
} ChatRoomConverter.java
public static ChatRoomDetailResponseDTO toChatRoomDetailResponseDTO(String nickname, String content, Long chatRoomId, Integer persona, Long memberId, boolean hasNewChat) {
content = content.trim();
content = content.replaceAll("[^a-zA-Z0-9가-힣]", ""); // 정규화 코드 추가
return ChatRoomDetailResponseDTO.builder()
.nickname(nickname)
.lastContent(content)
.chatRoomId(chatRoomId)
.persona(persona)
.memberId(memberId)
.hasNewChat(hasNewChat)
.build();
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 빠른 반영 수고하셨습니다
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGLGTM~
⚒️develop의 최신 커밋을 pull 받았나요?
네
#️⃣ 작업 내용
동작 확인
수정 전 쪽지방 목록 조회
수정 후 쪽지방 목록 조회
쪽지 작성 시
db 저장 상태 - trim 처리
💬 리뷰 요구사항(선택)