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

[SAMBAD-310]-손흔들기 accept 했을 때 프로필에서 NOT_REQUESTED로 뜨는 이슈 픽스 #152

Merged

Conversation

LeeHanEum
Copy link
Member

@LeeHanEum LeeHanEum commented Aug 28, 2024

📍 [SAMBAD-310]-손흔들기 accept 했을 때 프로필에서 NOT_REQUESTED로 뜨는 이슈 픽스

✔️ PR 타입(하나 이상의 PR 타입을 선택해주세요)

  • 기능 추가
  • 버그 수정
  • 의존성, 환경 변수, 빌드 관련 코드 업데이트
  • 기타 사소한 수정

📝 개요

  • 손흔들기 accept 했을 때 프로필에서 NOT_REQUESTED로 뜨는 이슈 픽스
  • sender receiver 바꿔서 한번 더 조회하고 둘다 empty면 NOT_REQUESTED 반환하게 함
      public HandWavingStatusResponse getHandWavingStatus(Long userId, Long meetingId, Long receiverMemberId) {
      	MeetingMember sender = meetingMemberService.getByUserIdAndMeetingId(userId, meetingId);
      	Optional<HandWaving> handWaving = getHandWavingBySenderIdAndReceiverId(sender.getId(), receiverMemberId)
      		.or(() -> getHandWavingBySenderIdAndReceiverId(receiverMemberId, sender.getId()));
      	return handWaving.map(waving -> HandWavingStatusResponse.of(waving.getStatus()))
      		.orElseGet(() -> HandWavingStatusResponse.of(NOT_REQUESTED));
      }

🔗 ISSUE 링크

@LeeHanEum LeeHanEum self-assigned this Aug 28, 2024
Copy link
Member

@nahyeon99 nahyeon99 left a comment

Choose a reason for hiding this comment

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

LGTM

@LeeHanEum LeeHanEum merged commit 713bb4b into develop Aug 28, 2024
1 of 2 checks passed
@LeeHanEum LeeHanEum deleted the refactor/SAMBAD-310-handwaving-status-when-accept branch August 28, 2024 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants