Skip to content
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

Merged
merged 4 commits into from
Jul 9, 2022

Conversation

suubinkim
Copy link
Member

@suubinkim suubinkim commented Jul 7, 2022

이슈

작업 내용

  • 메세지 상세 조회 api 추가
  • MessageDetailResponseDto 추가

기타 사항

  • 익명일때 발신자 정보 처리하는 부분 stream으로 해보려고 했는데 머리가 안 돌아가서 후에 리팩토링 해보겠습니다..
  • 삭제 머지후에 jpa 바뀐 부분 수정하고 다시 푸시할게요
  • 추가로 즐겨찾기 메세지 목록 조회도 익명 처리 수정해야겠더라구요 이것도 머지 되면 수정할게요..!

체크리스트

  • example

@suubinkim suubinkim added 💡feature API feature 📬메시지함 메시지함 🔍test test labels Jul 7, 2022
@suubinkim suubinkim added this to the 4차 스프린트 milestone Jul 7, 2022
@suubinkim suubinkim self-assigned this Jul 7, 2022
@suubinkim suubinkim added this to To do in BeTree via automation Jul 7, 2022
@suubinkim suubinkim marked this pull request as draft July 7, 2022 14:33
Copy link
Contributor

@kang-jisu kang-jisu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수빈님 제가이번주에 너무 뭘 못했네요..ㅠㅠㅠ
넘 수고하셨어요 ㅠ_ㅠ 늦어서 죄송합니다 ㅠㅠㅠㅠ

익명일때 발신자 정보 처리하는 부분 stream으로 해보려고 했는데 머리가 안 돌아가서 후에 리팩토링 해보겠습니다..

이부분이 어떤거 말하시는지 모르겠는데 지금 보통 MessageResponseDto.of에 익명일때 처리가 되어있어서 따로 안해도 되는거같은데 맞는지 확인부탁드려요!

Comment on lines 235 to 241
MessageBoxResponseDto boxResponseDto;
if (message.isAnonymous()) {
boxResponseDto = new MessageBoxResponseDto(message, "익명", "기본이미지");
} else {
SendUserDto sender = userService.findBySenderId(message.getSenderId());
boxResponseDto = MessageBoxResponseDto.of(message, sender);
}
Copy link
Contributor

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();
    }

@suubinkim suubinkim marked this pull request as ready for review July 9, 2022 14:06
@suubinkim suubinkim merged commit 9bd6eec into YAPP-Github:develop Jul 9, 2022
BeTree automation moved this from To do to Done Jul 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💡feature API feature 📬메시지함 메시지함 🔍test test
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants