-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fix/#118 매칭을 신청했으나, 매칭되지 않은 사용자의 매칭 상태 변경기능 추가 #119
Conversation
…ticipants로 매칭된 파트너가 있을때만 알림과 채팅방 개설 이벤트를 발행하도록 기능 수정
if (hasMatchedParticipants(participants)) { | ||
eventPublisher.createChatRoom(participants); | ||
eventPublisher.sendNotification(participants); | ||
} | ||
} | ||
|
||
private boolean hasMatchedParticipants(List<Participant> participants) { | ||
return !participants.stream().filter(Participant::hasPartner).toList().isEmpty(); | ||
} |
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.
fcm 알림을 보낼때, 보낼 대상이 한명도 없으면 에러가 터져서 추가한 메서드 입니다!
이번 회차에 매칭된 사용자들이 없으면 채팅방 생성 이벤트 및 알림 이벤트는 호출도 하지 않도록 설계했습니다!
participants.stream() | ||
.filter(participant -> !participant.hasPartner()) | ||
.forEach(Participant::expireMatch); |
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.
이번에 추가된 부분입니다~
매칭 되지 않은 사용자들의 매칭 신청을 만료 시키는 로직이에용
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.
변경된 내용 확인했습니다~ 고생하셨습니다 ㅎㅎ👍
🤨 Motivation
🔑 Key Changes
🙏 To Reviewers