-
Notifications
You must be signed in to change notification settings - Fork 1
refactor: 채팅 알림 뮤트 기능 1대1 채팅에서도 적용 #222
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -104,10 +104,11 @@ ResponseEntity<UnifiedChatMessageResponse> sendMessage( | |||||
| @UserId Integer userId | ||||||
| ); | ||||||
|
|
||||||
| @Operation(summary = "단체 채팅 알림 음소거를 토글한다.") | ||||||
| @PostMapping("/groups/{clubId}/mute") | ||||||
| @Operation(summary = "채팅 알림 기능 유무를 토글한다.") | ||||||
| @PostMapping("rooms/{chatRoomId}/mute") | ||||||
|
||||||
| @PostMapping("rooms/{chatRoomId}/mute") | |
| @PostMapping("/rooms/{chatRoomId}/mute") |
Copilot
AI
Feb 14, 2026
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.
이 엔드포인트는 1:1/단체 모두에 대한 뮤트 토글로 확장됐는데, 메서드명/응답 타입이 여전히 GroupChatMuteResponse 및 toggleGroupChatMute로 남아 있어 API 의미가 어긋납니다(스웨거에서도 "단체 채팅"으로 보일 가능성이 큼). 범용 이름(예: toggleChatMute)과 범용 응답 DTO로 변경하거나, 최소한 응답 스키마/설명을 현재 동작에 맞게 갱신해 주세요.
Copilot
AI
Feb 14, 2026
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.
PR 설명/체크리스트에 "테스트 코드 포함됨"으로 되어 있으나, 본 PR 변경 파일들에는 해당 기능(1:1 채팅 뮤트 토글 및 알림 억제)을 검증하는 테스트 추가/수정이 포함돼 있지 않습니다. 체크리스트를 업데이트하거나, 최소한 이 엔드포인트 및 뮤트 적용(알림 전송 여부)까지 포함하는 테스트를 PR에 포함해 주세요.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -73,11 +73,11 @@ public ResponseEntity<UnifiedChatMessageResponse> sendMessage( | |
|
|
||
| @Override | ||
| public ResponseEntity<GroupChatMuteResponse> toggleGroupChatMute( | ||
| @PathVariable(value = "clubId") Integer clubId, | ||
| @RequestParam(name = "type") ChatType type, | ||
| @PathVariable(value = "chatRoomId") Integer chatRoomId, | ||
| @UserId Integer userId | ||
| ) { | ||
| Boolean isMuted = groupChatService.toggleMute(clubId, userId); | ||
| Boolean isMuted = groupChatService.toggleMute(userId, type, chatRoomId); | ||
| return ResponseEntity.ok(new GroupChatMuteResponse(isMuted)); | ||
|
Comment on lines
74
to
81
|
||
| } | ||
|
|
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| package gg.agit.konect.domain.notification.enums; | ||
|
|
||
| public enum NotificationTargetType { | ||
| DIRECT_CHAT_ROOM, | ||
| GROUP_CHAT_ROOM | ||
| } |
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.
toggleMute에서 DIRECT_CHAT_ROOM 설정을 저장하도록 확장됐지만, 현재 코드베이스에서 1:1 채팅 알림 전송 경로(NotificationService.sendChatNotification / ChatService.sendMessage 등)에는 뮤트 설정을 조회해 알림을 건너뛰는 로직이 없습니다. 이 상태에서는 1:1 채팅에서 뮤트를 켜도 실제 푸시 알림이 계속 발송될 가능성이 높으니, DIRECT_CHAT_ROOM에 대한 뮤트 조회/필터링을 알림 전송 시점에 반드시 추가해 주세요.