Skip to content

[IDLE-571] ChatManager가 Center로서 공동 동작할 수 있도록 사용하는 id값 변경#272

Merged
mjj111 merged 2 commits intodevelopfrom
refactor/IDLE-571
May 6, 2025
Merged

[IDLE-571] ChatManager가 Center로서 공동 동작할 수 있도록 사용하는 id값 변경#272
mjj111 merged 2 commits intodevelopfrom
refactor/IDLE-571

Conversation

@mjj111
Copy link
Copy Markdown
Member

@mjj111 mjj111 commented May 6, 2025

1. 📄 Summary

요양보호사가 Center에게 채팅을 보내면,
CenterManager들은 본인의 센터와 관련된 채팅을 공동으로 접근하고 사용할 수 있도록 하였습니다.

Summary by CodeRabbit

  • 신규 기능
    • 채팅 메시지 전송 및 읽기 기능이 보호자와 센터장 역할별로 분리되었습니다. 이제 각각의 역할에 맞는 별도의 엔드포인트(/send/carer, /read/carer, /send/center, /read/center)를 통해 채팅을 이용할 수 있습니다.
    • 센터장 인증 정보를 기반으로 센터 ID를 자동으로 조회하는 기능이 추가되어 센터 관련 채팅 관리가 개선되었습니다.
  • 버그 수정
    • 센터 정보가 없을 경우 명확한 오류 메시지가 제공되어 문제 상황 인지가 쉬워졌습니다.

@mjj111 mjj111 added the 🎯리팩토링 리팩토링 및 고도화 이슈 label May 6, 2025
@mjj111 mjj111 self-assigned this May 6, 2025
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented May 6, 2025

"""

Walkthrough

채팅 기능이 사용자 역할(요양보호사와 센터 관리자)에 따라 분리되어 처리되도록 서비스와 컨트롤러가 리팩터링되었습니다. 각 역할별로 메시지 전송, 읽기, 채팅방 생성 및 요약 조회 메서드가 별도로 구현되었으며, 엔드포인트도 역할별로 분리되었습니다.

Changes

파일/경로 변경 요약
.../chat/facade/ChatFacadeService.kt 채팅 관련 메서드가 요양보호사(carer)와 센터 관리자(center) 역할별로 분리됨. 역할별 메시지 전송/읽기/채팅방 생성/요약 조회 메서드 추가 및 수정. 센터 정보 조회 및 센터 관리자 목록 조회를 위한 private 메서드 추가. 생성자에 centerManagerService 의존성 추가.
.../chat/controller/ChatSocketController.kt WebSocket 엔드포인트가 /send/carer, /read/carer, /send/center, /read/center로 역할별로 분리됨. 각 엔드포인트에서 역할별 서비스 메서드 호출하도록 변경. 기존의 통합 send/read 메서드는 역할별로 분리됨.

Sequence Diagram(s)

sequenceDiagram
    participant Carer
    participant ChatSocketController
    participant ChatFacadeService
    participant CenterManagerService
    participant ChatService
    participant NotificationService

    Carer->>ChatSocketController: /send/carer (SendChatMessageRequest)
    ChatSocketController->>ChatFacadeService: carerSend(request, carerId)
    ChatFacadeService->>ChatService: sendMessage(request, carerId)
    ChatFacadeService->>NotificationService: notifyManagers()
    ChatFacadeService->>CenterManagerService: getManagersByCenterId(centerId)
Loading
sequenceDiagram
    participant CenterManager
    participant ChatSocketController
    participant ChatFacadeService
    participant CenterService
    participant ChatService
    participant NotificationService

    CenterManager->>ChatSocketController: /send/center (SendChatMessageRequest)
    ChatSocketController->>ChatFacadeService: centerSend(request, managerId)
    ChatFacadeService->>CenterService: getCenterId(managerId)
    ChatFacadeService->>ChatService: sendMessage(request, centerId)
    ChatFacadeService->>NotificationService: notifyCarer()
Loading

Possibly related PRs

  • [IDLE-557] 채팅 API Response 값 변경  #267: ChatFacadeService 내 메서드 시그니처 변경 및 코루틴 제거를 통한 채팅 메시지 저장 및 읽기 로직 단순화, 본 PR과는 역할별 메서드 분리와 관련된 코드 변경으로 연관됨.
    """

📜 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 0a08dcf and e9e07e8.

📒 Files selected for processing (1)
  • idle-application/src/main/kotlin/com/swm/idle/application/chat/facade/ChatFacadeService.kt (6 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • idle-application/src/main/kotlin/com/swm/idle/application/chat/facade/ChatFacadeService.kt
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Build and analyze
✨ Finishing Touches
  • 📝 Generate Docstrings

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.
    • Generate unit testing code for this file.
    • 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. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • 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 src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

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

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

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.

Documentation and Community

  • 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.

coderabbitai[bot]

This comment was marked as resolved.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented May 6, 2025

@mjj111 mjj111 merged commit 6e30366 into develop May 6, 2025
5 checks passed
@mjj111 mjj111 deleted the refactor/IDLE-571 branch May 6, 2025 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🎯리팩토링 리팩토링 및 고도화 이슈

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant