feat(chat): 메시지 반응(👍👎), 답글(reply), 본인 선택지 배지 기능 추가#249
Conversation
|
Warning Review limit reached
More reviews will be available in 11 minutes. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses rolling per-developer review limits. Reviews become available again as older review attempts age out of the rolling limit window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (40)
✨ Finishing Touches🧪 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 |
- 메시지 답글 지원 (parentMessageId + replyTo 정보)
- 메시지 반응(THUMBS_UP / THUMBS_DOWN) 추가/취소/카운트
- ChatMessageReaction 도메인 + ReactionCount / MyReaction 프로젝션
- 채팅방 진입 시 myVoteOption 배지 정보 제공 (ChatRoomResponse)
- SendMessageRequest에 replyToMessageId 추가
- GET /messages 응답에 replyTo, reactions, myReaction 포함
- PUT /messages/{messageId}/reactions 반응 API 신규
- V17 마이그레이션 (parent_message_id + chat_message_reaction 테이블)
- WS 브로드캐스트에 replyTo 정보 포함
명세: docs/spec/chat-reactions-replies-badge-api-improvement.md
- contentPreview는 전체 내용을 그대로 내림 (프론트에서 말줄임 처리) - ReplyInfo, buildReplyInfo, loadParentInfos, buildReplyInfoForBroadcast 업데이트 - 스펙 문서도 반영
- Add senderId to MessageResult and MessageResponse - Update constructions in service and event listener - Update tests accordingly
275f4ce to
1d6a091
Compare
… V16, align with spec
ReplyInfoResolver로 답글 원문 사용자 조회를 통합하고, 메시지 목록 enrichment에 batch 사용자 조회를 적용한다. 반응 변경 시 REACTION_UPDATED WebSocket 브로드캐스트를 추가하고, 메시지 없음/불일치는 404로 분리한다.
sender_id와 parent_message_id를 User·ChatMessage @manytoone으로 선언하고 JOIN FETCH 조회로 연관 엔티티를 바로 사용하도록 서비스·리스너·테스트를 정리한다.
sid, nick, col, msg, myReact를 senderId, senderNickname, senderProfileIcon, message, myReaction으로 변경한다.
원문 메시지가 없을 때 닉네임 상수 중복을 제거하고, contentPreview용 삭제 메시지 문구만 채팅 도메인에 유지한다.
parent chat_message row가 없으면 replyTo를 null로 반환한다. ON DELETE SET NULL과 동일한 동작이며, synthetic 삭제 메시지 응답을 제거한다.
Testcontainers PostgreSQL 위에서 채팅방 조회, 메시지 전송/조회, 반응 추가·변경·취소 및 에러 케이스를 검증한다.
|
빌드 실패 |
WebMvcTest에서 Long principal 인증을 사용하고, ChatServiceTest mockUser 스텁 충돌 및 assertion을 정리한다.
|
빌드 성공 |
요약
채팅방 진행 중 상세 개선 (5-1 ~ 5-6) 구현
myVoteOption(A/B) 상시 제공.GET /api/chats/{voteId}응답에 추가.PUT /api/chats/{voteId}/messages/{messageId}/reactionsreplyToMessageId로 답글 전송, 메시지 응답에replyTo(원문 미리보기) 포함reactions,myReaction,replyTo추가변경 파일
ChatMessageReaction,ReactionCount,MyReaction,ChatReactionTypeMessageResult/Response,SendMessage*,ChatRoom*,Reaction*,ReplyInfoV17__chat_reaction_and_reply.sql명세 문서: chat-reactions-replies-badge-api-improvement.md
테스트 현황
ChatServiceTest,ChatControllerTest등은 통과reactToMessage, reply 포함 sendMessage, getMessages enrichment, reactions 응답 등 커버리지 부족PUT /messages/.../reactions테스트 없음추후 테스트 보강 필요 (unit + integration)
체크리스트