Skip to content

Commit

Permalink
[SAMBAD-310]-fix : 손흔들기 accept 했을 때 프로필에서 NOT_REQUESTED로 뜨는 이슈 픽스
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeHanEum committed Aug 28, 2024
1 parent 0010c12 commit 438a14e
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ public void sendHandWaving(Long userId, Long meetingId, HandWavingRequest reques

public HandWavingStatusResponse getHandWavingStatus(Long userId, Long meetingId, Long receiverMemberId) {
MeetingMember sender = meetingMemberService.getByUserIdAndMeetingId(userId, meetingId);
Optional<HandWaving> handWaving = getHandWavingBySenderIdAndReceiverId(sender.getId(), receiverMemberId);
return handWaving.map(waving -> HandWavingStatusResponse.of(waving.getId(), waving.getStatus()))
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));
}

Expand Down

0 comments on commit 438a14e

Please sign in to comment.