-
Notifications
You must be signed in to change notification settings - Fork 2
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
[feat] 메세지 상세 조회 api 및 테스트 추가 #56
[feat] 메세지 상세 조회 api 및 테스트 추가 #56
Conversation
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.
수빈님 제가이번주에 너무 뭘 못했네요..ㅠㅠㅠ
넘 수고하셨어요 ㅠ_ㅠ 늦어서 죄송합니다 ㅠㅠㅠㅠ
익명일때 발신자 정보 처리하는 부분 stream으로 해보려고 했는데 머리가 안 돌아가서 후에 리팩토링 해보겠습니다..
이부분이 어떤거 말하시는지 모르겠는데 지금 보통 MessageResponseDto.of에 익명일때 처리가 되어있어서 따로 안해도 되는거같은데 맞는지 확인부탁드려요!
MessageBoxResponseDto boxResponseDto; | ||
if (message.isAnonymous()) { | ||
boxResponseDto = new MessageBoxResponseDto(message, "익명", "기본이미지"); | ||
} else { | ||
SendUserDto sender = userService.findBySenderId(message.getSenderId()); | ||
boxResponseDto = MessageBoxResponseDto.of(message, sender); | ||
} |
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.
MessageBoxResponseDto.of 에 이미 익명인지 아닌지에 따라 처리가 되어있는데 if문이 필요할까요 ?ㅁ?
public static MessageBoxResponseDto of(Message message, SendUserDto user) {
return MessageBoxResponseDto.builder()
.message(message)
.senderNickname(message.isAnonymous() ? "익명" : user.getNickname())
.senderProfileImage(message.isAnonymous() ? "기본 이미지" : user.getUserImage())
.build();
}
이슈
작업 내용
기타 사항
체크리스트