Skip to content

Conversation

@Hyun0828
Copy link
Collaborator

@Hyun0828 Hyun0828 commented Aug 12, 2025

PR 타입(하나 이상의 PR 타입을 선택해주세요)

  • 기능 추가
  • 기능 삭제
  • 버그 수정
  • 의존성, 환경 변수, 빌드 관련 코드 업데이트
  • 리팩터링

반영 브랜치

feat/#406-chat -> dev

작업 내용

진행 중인 팟에서 회원 탈퇴시, 회원의 채팅 메시지 삭제

테스트 결과

Summary by CodeRabbit

  • 신기능
    • 채팅방에서 사용자가 자신의 메시지를 삭제할 수 있는 기능을 추가했습니다. 특정 사용자와 채팅방 기준으로 메시지를 일괄 삭제하여 불필요한 대화를 손쉽게 정리할 수 있습니다. 삭제는 즉시 반영되며 대화 목록에서도 사라집니다. 이를 통해 대화 관리 편의성과 개인정보 보호가 강화되었습니다.

@coderabbitai
Copy link

coderabbitai bot commented Aug 12, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Repository에 userId와 chatRoomId 조합으로 채팅 문서를 삭제하는 파생 메서드를 추가하고, 서비스 계층에 이를 위임 호출하는 삭제 메서드를 공개 추가했습니다. 기존 동작 변경은 없습니다.

Changes

Cohort / File(s) Summary of Changes
Repository 삭제 메서드 추가
src/main/java/stackpot/mongo/ChatRepository.java
파생 쿼리 메서드 void deleteByUserIdAndChatRoomId(Long userId, Long chatRoomId) 추가
Service 위임 메서드 추가
src/main/java/stackpot/stackpot/chat/service/chat/ChatCommandService.java
public void deleteChatMessage(Long userId, Long chatRoomId) 추가; Repository의 삭제 메서드로 위임

Sequence Diagram(s)

sequenceDiagram
  actor Client
  participant Service as ChatCommandService
  participant Repo as ChatRepository
  participant DB as MongoDB

  Client->>Service: deleteChatMessage(userId, chatRoomId)
  Service->>Repo: deleteByUserIdAndChatRoomId(userId, chatRoomId)
  Repo->>DB: Delete Chat where userId & chatRoomId
  DB-->>Repo: Ack
  Repo-->>Service: void
  Service-->>Client: void
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~7 minutes

Possibly related issues

Poem

깡총, 로그를 따라 톡톡 흔적 지우니,
방과 닉이 만나면 한 번에 휙—사라지니.
봄풀 사이 데이터 바람 살랑,
레포 한 줄, 서비스 한 번—말랑.
오늘도 깔끔, 히스토리 반짝! 🐇✨


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 40edb56 and df205a5.

📒 Files selected for processing (2)
  • src/main/java/stackpot/mongo/ChatRepository.java (1 hunks)
  • src/main/java/stackpot/stackpot/chat/service/chat/ChatCommandService.java (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/#406-chat

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@Hyun0828 Hyun0828 closed this Aug 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants