Repository navigation
feat: 채팅 API 및 WebSocket 실시간 통신 구현(#54) - #57
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
관련 이슈
작업 내용
상세 변경 사항
chat도메인을 새로 추가하고ChatRoom,ChatMessage엔티티를 구현했습니다.ChatRoomStatus,ChatCloseRequester,ChatMessageStatusenum을 추가했습니다.ChatRoomRepository,ChatMessageRepository를 추가했습니다.MypageService.approveOBMentoringRequest()에 채팅방 생성 로직을 연동했습니다.GET /api/chat/rooms추가GET /api/chat/rooms/{roomId}추가GET /api/chat/rooms/{roomId}/messages추가POST /api/chat/rooms/{roomId}/messages추가POST /api/chat/rooms/{roomId}/read추가POST /api/chat/rooms/{roomId}/close-request추가POST /api/chat/rooms/{roomId}/close-approve추가PUT /api/chat/rooms/{roomId}/schedule추가/ws/chatWebSocket endpoint를 추가했습니다.구현 포인트
closeRequester,ChatRoomStatus,MentoringApplication.status가 함께 정합성 있게 변경되도록 구성했습니다.MentoringApplication -> COMPLETED,ChatRoom -> READ_ONLY를 한 트랜잭션에서 반영했습니다.CONNECT시Authorization헤더 기반 인증을 수행하도록 구성했습니다.ChatService를 타고 서비스 레벨에서 실시간 이벤트를 발행하도록 설계했습니다.MESSAGE_SENT,MESSAGE_READ,CLOSE_REQUESTED,CLOSE_APPROVED,SCHEDULE_UPDATED,ROOM_LIST_UPDATED로 분리해 프론트가 필요한 화면만 갱신할 수 있도록 했습니다.테스트
./gradlew compileJava성공 확인참고 사항
Authorization: Bearer {accessToken}헤더를 함께 전달해야 합니다.