Skip to content

[FEAT] 모임 삭제 알림 수정#193

Merged
LimdaeIl merged 1 commit intomainfrom
feat/delete-group
Jan 1, 2026
Merged

[FEAT] 모임 삭제 알림 수정#193
LimdaeIl merged 1 commit intomainfrom
feat/delete-group

Conversation

@LimdaeIl
Copy link
Collaborator

@LimdaeIl LimdaeIl commented Jan 1, 2026

📝 Pull Request

📌 PR 종류

해당하는 항목에 체크해주세요.

  • 기능 추가 (Feature)
  • 버그 수정 (Fix)
  • 문서 수정 (Docs)
  • 코드 리팩터링 (Refactor)
  • 테스트 추가 (Test)
  • 기타 변경 (Chore)

✨ 변경 내용

그룹 삭제 알림에 그룹 ID와 제목이 포함되어 사용자에게 더 자세한 정보를 제공합니다.
또한, 참석(ATTEND) 및 대기(PENDING) 상태의 사용자까지 그룹 삭제 알림 대상에 추가합니다. 이를 통해 더욱 완벽한 알림 환경을 제공합니다.

🔍 관련 이슈

🧪 테스트

변경된 기능에 대한 테스트 범위 또는 테스트 결과를 작성해주세요.

  • 유닛 테스트 추가 / 수정
  • 통합 테스트 검증
  • 수동 테스트 완료

🚨 확인해야 할 사항 (Checklist)

PR을 제출하기 전에 아래 항목들을 확인해주세요.

  • 코드 포매팅 완료
  • 불필요한 파일/코드 제거
  • 로직 검증 완료
  • 프로젝트 빌드 성공
  • 린트/정적 분석 통과 (해당 시)

🙋 기타 참고 사항

리뷰어가 참고하면 좋을 만한 추가 설명이 있다면 적어주세요.

Summary by CodeRabbit

릴리스 노트

  • 버그 수정
    • 그룹 삭제 시 알림 전송 대상 확대: 참여 중인 사용자뿐만 아니라 대기 중인 사용자도 포함됩니다.
    • 그룹 삭제 알림 메시지 개선: 그룹 제목과 삭제 요청자 정보가 더 명확하게 포함됩니다.

✏️ Tip: You can customize this high-level summary in your review settings.

그룹 삭제 알림에 그룹 ID와 제목이 포함되어 사용자에게 더 자세한 정보를 제공합니다.
또한, 참석(ATTEND) 및 대기(PENDING) 상태의 사용자까지 그룹 삭제 알림 대상에 추가합니다.
이를 통해 더욱 완벽한 알림 환경을 제공합니다.
@LimdaeIl LimdaeIl self-assigned this Jan 1, 2026
Copilot AI review requested due to automatic review settings January 1, 2026 13:06
@LimdaeIl LimdaeIl added the ✨enhancement New feature or request label Jan 1, 2026
@LimdaeIl LimdaeIl moved this from Backlog to In progress in WeGo-Together Backend Jan 1, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 1, 2026

Caution

Review failed

The pull request is closed.

Walkthrough

모임 삭제 알림에 삭제된 모임의 정보(ID, 이름)를 포함시키기 위해 NotificationDispatcher와 NotificationItemResponse에 새로운 오버로드 메서드를 추가했습니다. GroupV2DeleteService에서 ATTEND와 PENDING 상태의 사용자를 모두 조회하도록 변경했습니다.

Changes

코호트 / 파일 변경 요약
알림 디스패처 개선
src/main/java/team/wego/wegobackend/notification/application/dispatcher/NotificationDispatcher.java, src/main/java/team/wego/wegobackend/notification/application/dto/response/NotificationItemResponse.java
NotificationDispatcher에 새로운 오버로드 메서드 dispatch(List<Notification>, User, Long, String) 추가. NotificationItemResponse에 groupId와 groupTitle을 직접 받는 새로운 팩토리 메서드 of(Notification, User, Long, String) 추가. 기존 메서드는 유지됨.
모임 삭제 알림 업데이트
src/main/java/team/wego/wegobackend/group/v2/application/handler/GroupDeleteNotificationHandler.java
NotificationDispatcher.dispatch 호출 시 groupId와 groupTitle을 새로운 매개변수로 전달하도록 변경.
모임 삭제 서비스 로직 변경
src/main/java/team/wego/wegobackend/group/v2/application/service/GroupV2DeleteService.java
새로운 저장소 메서드 findUserIdsByGroupIdAndStatuses를 사용하여 ATTEND와 PENDING 상태의 사용자 ID를 모두 조회하도록 변경.
저장소 메서드 추가
src/main/java/team/wego/wegobackend/group/v2/domain/repository/GroupUserV2Repository.java
새로운 쿼리 메서드 findUserIdsByGroupIdAndStatuses(Long groupId, List<GroupUserV2Status> statuses) 추가. 단일 상태만 처리하는 기존 메서드와 구분됨.
알림 메시지 개선
src/main/java/team/wego/wegobackend/notification/domain/Notification.java
createGroupDeleteNotification에서 알림 메시지에 행위자 ID를 추가로 포함하도록 기능 변경. 레이아웃 포맷팅 조정.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 모임이 사라질 때도 정보를 남기니,
삭제된 추억은 알림으로 살아나고,
ATTEND와 PENDING 모두 고르게 알려주니,
토끼도 박수를 쳐주는 이 변경! ✨

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bc871a0 and 28b006f.

📒 Files selected for processing (6)
  • src/main/java/team/wego/wegobackend/group/v2/application/handler/GroupDeleteNotificationHandler.java
  • src/main/java/team/wego/wegobackend/group/v2/application/service/GroupV2DeleteService.java
  • src/main/java/team/wego/wegobackend/group/v2/domain/repository/GroupUserV2Repository.java
  • src/main/java/team/wego/wegobackend/notification/application/dispatcher/NotificationDispatcher.java
  • src/main/java/team/wego/wegobackend/notification/application/dto/response/NotificationItemResponse.java
  • src/main/java/team/wego/wegobackend/notification/domain/Notification.java

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@LimdaeIl LimdaeIl merged commit 6acfe7e into main Jan 1, 2026
4 of 5 checks passed
@LimdaeIl LimdaeIl deleted the feat/delete-group branch January 1, 2026 13:06
@github-project-automation github-project-automation bot moved this from In progress to Done in WeGo-Together Backend Jan 1, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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()
Copy link

Copilot AI Jan 1, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
.message(actor.getNickName() + "님이 \"" + groupTitle + "\" 모임(" + actor.getId()
.message(actor.getNickName() + "님이 \"" + groupTitle + "\" 모임(" + groupId

Copilot uses AI. Check for mistakes.
Comment on lines +184 to +185
.message(actor.getNickName() + "님이 \"" + groupTitle + "\" 모임(" + actor.getId()
+ ") 을 삭제했어요.")
Copy link

Copilot AI Jan 1, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
.message(actor.getNickName() + "님이 \"" + groupTitle + "\" 모임(" + actor.getId()
+ ") 을 삭제했어요.")
.message(actor.getNickName() + "님이 \"" + groupTitle + "\" 모임 (" + actor.getId()
+ ")을 삭제했어요.")

Copilot uses AI. Check for mistakes.

List<Long> attendeeIds = groupUserV2Repository.findUserIdsByGroupIdAndStatuses(groupId, targets)
.stream()
.distinct()
Copy link

Copilot AI Jan 1, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
.distinct()

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[FEAT] 모임 삭제 알림 수정

1 participant

Comments