Repository navigation
채팅방 조회/메시지 전송/읽음 처리 API 구현 - #42
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (14)
📝 WalkthroughWalkthroughSix new REST endpoints are added to ChangesChat Room Operations
Sequence Diagram(s)sequenceDiagram
participant Client
participant ChatRoomController
participant ChatRoomService
participant ChatParticipantRepository
participant ChatMessageRepository
participant MediaRepository
rect rgba(70, 130, 180, 0.5)
note over Client, ChatParticipantRepository: GET /chat-rooms
Client->>ChatRoomController: GET /chat-rooms
ChatRoomController->>ChatRoomService: getMyChatRooms()
ChatRoomService->>ChatParticipantRepository: findByUser_IdxWithChatRoom(userIdx)
ChatRoomService->>ChatParticipantRepository: countByChatRoomIdxIn(roomIds)
ChatRoomService-->>Client: List~ChatRoomListResponse~
end
rect rgba(60, 179, 113, 0.5)
note over Client, MediaRepository: GET /chat-rooms/{idx}/messages
Client->>ChatRoomController: GET /chat-rooms/{idx}/messages?cursor&size
ChatRoomController->>ChatRoomService: getMessages(roomIdx, cursor, size)
ChatRoomService->>ChatParticipantRepository: existsByChatRoom_IdxAndUser_Idx
ChatRoomService->>ChatMessageRepository: findByChatRoom_IdxAndIdxLessThanOrderByIdxDesc (or no-cursor variant)
ChatRoomService->>MediaRepository: resolve file URLs per message
ChatRoomService-->>Client: ChatMessageListResponse (hasNext, nextCursor, messages)
end
rect rgba(210, 105, 30, 0.5)
note over Client, ChatMessageRepository: POST /chat-rooms/{idx}/messages
Client->>ChatRoomController: POST /chat-rooms/{idx}/messages (SendMessageRequest)
ChatRoomController->>ChatRoomService: sendMessage(roomIdx, request)
ChatRoomService->>ChatParticipantRepository: existsByChatRoom_IdxAndUser_Idx
ChatRoomService->>MediaRepository: lookup by fileUuid (if FILE type)
ChatRoomService-->>Client: ChatMessageResponse
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
Summary by CodeRabbit
Release Notes
New Features
Tests