Conversation
그룹 삭제 알림에 그룹 ID와 제목이 포함되어 사용자에게 더 자세한 정보를 제공합니다. 또한, 참석(ATTEND) 및 대기(PENDING) 상태의 사용자까지 그룹 삭제 알림 대상에 추가합니다. 이를 통해 더욱 완벽한 알림 환경을 제공합니다.
|
Caution Review failedThe pull request is closed. Walkthrough모임 삭제 알림에 삭제된 모임의 정보(ID, 이름)를 포함시키기 위해 NotificationDispatcher와 NotificationItemResponse에 새로운 오버로드 메서드를 추가했습니다. GroupV2DeleteService에서 ATTEND와 PENDING 상태의 사용자를 모두 조회하도록 변경했습니다. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
✨ Finishing touches
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (6)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR enhances group deletion notifications by including group ID and title in the notification message, and extends notification recipients to include users with both ATTEND and PENDING statuses (previously only ATTEND users received notifications).
Key Changes:
- Added group ID to deletion notification messages for better user context
- Expanded notification recipients to include PENDING status users alongside ATTEND users
- Created new repository method and dispatcher overload to support passing group snapshots (ID and title) for deleted groups
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
Notification.java |
Updated group delete notification message to include group ID in the message text |
NotificationItemResponse.java |
Added factory method overload to accept group ID and title as separate parameters instead of GroupV2 entity |
NotificationDispatcher.java |
Added dispatch method overload that accepts group ID and title separately for deleted groups |
GroupUserV2Repository.java |
Added new query method to find user IDs by group ID and multiple statuses |
GroupV2DeleteService.java |
Updated to query users with both ATTEND and PENDING statuses for notification recipients |
GroupDeleteNotificationHandler.java |
Updated to pass group ID and title to the new dispatcher method |
Comments suppressed due to low confidence (1)
src/main/java/team/wego/wegobackend/notification/domain/Notification.java:66
- Default toString(): User inherits toString() from Object, and so is not suitable for printing.
@Builder
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| .actor(actor) | ||
| .type(NotificationType.GROUP_DELETE) | ||
| .message(actor.getNickName() + "님이 \"" + groupTitle + "\" 모임을 삭제했어요.") | ||
| .message(actor.getNickName() + "님이 \"" + groupTitle + "\" 모임(" + actor.getId() |
There was a problem hiding this comment.
The message is using actor.getId() instead of groupId. This means the notification will display the actor's user ID instead of the group ID, which is incorrect. The parameter should be groupId to match the intended purpose of displaying the group ID in the notification message.
| .message(actor.getNickName() + "님이 \"" + groupTitle + "\" 모임(" + actor.getId() | |
| .message(actor.getNickName() + "님이 \"" + groupTitle + "\" 모임(" + groupId |
| .message(actor.getNickName() + "님이 \"" + groupTitle + "\" 모임(" + actor.getId() | ||
| + ") 을 삭제했어요.") |
There was a problem hiding this comment.
There is a spacing issue in the Korean message. "모임(" should have a space before the opening parenthesis, and ") 을" should be ")을" without a space. The correct format should be "모임 (ID)을" following Korean typography conventions.
| .message(actor.getNickName() + "님이 \"" + groupTitle + "\" 모임(" + actor.getId() | |
| + ") 을 삭제했어요.") | |
| .message(actor.getNickName() + "님이 \"" + groupTitle + "\" 모임 (" + actor.getId() | |
| + ")을 삭제했어요.") |
|
|
||
| List<Long> attendeeIds = groupUserV2Repository.findUserIdsByGroupIdAndStatuses(groupId, targets) | ||
| .stream() | ||
| .distinct() |
There was a problem hiding this comment.
The distinct() call is unnecessary here. The repository query already returns unique user IDs since it's selecting from a single table with a unique constraint on (group_id, user_id). The distinct operation adds unnecessary processing overhead.
| .distinct() |
📝 Pull Request
📌 PR 종류
해당하는 항목에 체크해주세요.
✨ 변경 내용
그룹 삭제 알림에 그룹 ID와 제목이 포함되어 사용자에게 더 자세한 정보를 제공합니다.
또한, 참석(ATTEND) 및 대기(PENDING) 상태의 사용자까지 그룹 삭제 알림 대상에 추가합니다. 이를 통해 더욱 완벽한 알림 환경을 제공합니다.
🔍 관련 이슈
🧪 테스트
변경된 기능에 대한 테스트 범위 또는 테스트 결과를 작성해주세요.
🚨 확인해야 할 사항 (Checklist)
PR을 제출하기 전에 아래 항목들을 확인해주세요.
🙋 기타 참고 사항
리뷰어가 참고하면 좋을 만한 추가 설명이 있다면 적어주세요.
Summary by CodeRabbit
릴리스 노트
✏️ Tip: You can customize this high-level summary in your review settings.