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

Fix/#118 매칭을 신청했으나, 매칭되지 않은 사용자의 매칭 상태 변경기능 추가 #119

Merged
merged 13 commits into from
Jun 10, 2024

Conversation

suhyun0918
Copy link
Collaborator

🤨 Motivation

🔑 Key Changes

  • 이번에 실제 배포환경에서 매칭 신청에 따른 회원의 매칭 상태가 어떤지 RDS에서 직접 확인해본 결과, 제가 미처 구현하지 못한 오류를 발견하여 기능을 추가 & 수정했습니다.

🙏 To Reviewers

  • 정작 추가된 코드라인은 10줄 남짓도 안됩니다... ;; ㅎㅎ

@suhyun0918 suhyun0918 added feat 기능 개발 이슈 fix 오류 관련 태그 style 코드 스타일 관련 태그 test 테스트 관련 태그 labels Jun 5, 2024
@suhyun0918 suhyun0918 requested review from mjj111 and coke98 June 5, 2024 05:58
@suhyun0918 suhyun0918 self-assigned this Jun 5, 2024
Comment on lines +111 to 119
if (hasMatchedParticipants(participants)) {
eventPublisher.createChatRoom(participants);
eventPublisher.sendNotification(participants);
}
}

private boolean hasMatchedParticipants(List<Participant> participants) {
return !participants.stream().filter(Participant::hasPartner).toList().isEmpty();
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fcm 알림을 보낼때, 보낼 대상이 한명도 없으면 에러가 터져서 추가한 메서드 입니다!
이번 회차에 매칭된 사용자들이 없으면 채팅방 생성 이벤트 및 알림 이벤트는 호출도 하지 않도록 설계했습니다!

Comment on lines +108 to +110
participants.stream()
.filter(participant -> !participant.hasPartner())
.forEach(Participant::expireMatch);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

이번에 추가된 부분입니다~
매칭 되지 않은 사용자들의 매칭 신청을 만료 시키는 로직이에용

Copy link
Member

@mjj111 mjj111 left a comment

Choose a reason for hiding this comment

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

변경된 내용 확인했습니다~ 고생하셨습니다 ㅎㅎ👍

@mjj111 mjj111 merged commit e57e65a into develop Jun 10, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat 기능 개발 이슈 fix 오류 관련 태그 style 코드 스타일 관련 태그 test 테스트 관련 태그
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants