-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: [ALT-270] 채팅 개선 그룹 단톡·읽음처리·presence·이미지·RabbitMQ relay #95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
hodoon
wants to merge
35
commits into
dev
Choose a base branch
from
refactor/ALT-270
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
184d82f
chore: gitignore 추가
hodoon 92830e6
feat: ChatRoomType/ChatMessageType enum 추가
hodoon a0a9947
feat: ChatRoom/ChatMessage에 type·workspaceId 추가, 그룹방 팩토리
hodoon f39e63c
feat: ChatRoomMember 엔티티·리포지토리 추가
hodoon 18c8e60
feat: 채팅 통합 스키마 마이그레이션(V4)
hodoon 64dec7b
feat: 업장 단톡 멤버십 동기화 UseCase(join/leave/createGroupRoom)
hodoon 15c7fb2
feat: 업장 생성 시 그룹 단톡 자동 생성 및 매니저 입장
hodoon ab5660b
feat: 워커 가입/퇴사 시 업장 단톡 멤버십 자동 동기화
hodoon e717f92
feat: 통합 전송 UseCase - NOTICE 권한·그룹 멤버 참여자 검증
hodoon 2d5486d
feat: 채팅방 읽음 처리 UseCase 및 엔드포인트
hodoon 93a122d
fix: 업장 단톡 매니저 입장 시 참여자 id를 User id로 정정
hodoon cfca2cc
feat: 메시지별 안 읽은 사람 수 집계 및 응답 반영
hodoon 3e39944
feat: Redis 기반 채팅 presence 저장소
hodoon c9d48cb
feat: STOMP 연결/해제 이벤트로 presence 갱신
hodoon 42cb0d0
feat: presence 기반 푸시 폴백 - 오프라인 멤버에게만 FCM
hodoon 01dd9f9
feat: STOMP 브로커 RabbitMQ relay 토글 지원(기본 SimpleBroker 유지)
hodoon bb61493
chore: 오배치된 local-infra 제거 (실제 local-infra는 워크스페이스 루트에 위치)
hodoon 9379f85
feat: 이미지-only 메시지 위해 chat_messages.content nullable 전환
hodoon d00f9b4
feat: 채팅 전송 요청에 fileIds 추가 및 첨부 관련 ErrorCode
hodoon 581d7ad
feat: 채팅 메시지 이미지 첨부 연결 및 실시간 payload에 URL 포함
hodoon 4ccbee5
feat: 채팅 메시지 조회 응답에 이미지 첨부 포함
hodoon 96f86aa
feat: 이미지 메시지 푸시 알림 본문 처리
hodoon 55e7d6a
fix: 새 1:1 채팅방 생성 시 chat_room_members 행 생성 (읽음/안읽은수 정상화)
hodoon 97956ee
fix: 업장 단톡 멤버십 동기화 self-healing (레거시 업장 채용/퇴사 롤백 방지)
hodoon cd34c95
fix: 그룹 채팅 메시지 조회 인증 dual-path (그룹 멤버 히스토리 조회 가능)
hodoon 7832c92
feat: 업장 그룹 채팅방 조회(discovery) 엔드포인트
hodoon e06b4a5
refactor: 업장 채팅 멤버십 동기화를 AFTER_COMMIT 이벤트로 분리(코어 트랜잭션 롤백 방지)
hodoon b379d92
fix: STOMP relay용 reactor-netty 의존성 정정 (reactor-netty-core→reactor-ne…
hodoon 682bf97
feat: 기존 업장 그룹 단톡방·멤버 백필 마이그레이션(V6)
hodoon 3c3e295
fix: [ALT-270] 코드 리뷰 반영 — 읽음 요청 @Valid, 그룹방 유니크 제약, 첨부 setter 범위
hodoon 07f302a
fix: [ALT-270] 그룹방 조회 fetchOne→fetchFirst (중복 데이터에도 예외 방지)
hodoon d2ad9d8
fix: [ALT-270] ChatRoom.createGroup workspaceId null 검증 (도메인 불변식)
hodoon eee228e
fix: [ALT-270] presence 다중 세션 참조카운트 — 마지막 세션 종료 시에만 오프라인
hodoon c429f6f
test: [ALT-270] 채팅 관련 테스트 클래스 네이밍 *Test → *Tests 통일
hodoon d1aafb5
test: [ALT-270] 채팅 테스트 BDD 스타일 통일 (when→given)
hodoon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -58,3 +58,6 @@ CLAUDE.md | |
| .codex | ||
| .agents/* | ||
| AGENTS.md | ||
|
|
||
| # graphify 지식그래프 산출물 | ||
| graphify-out/ | ||
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
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
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
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
19 changes: 19 additions & 0 deletions
19
...java/com/dreamteam/alter/adapter/inbound/general/chat/dto/MarkChatRoomReadRequestDto.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| package com.dreamteam.alter.adapter.inbound.general.chat.dto; | ||
|
|
||
| import io.swagger.v3.oas.annotations.media.Schema; | ||
| import jakarta.validation.constraints.NotNull; | ||
| import lombok.AllArgsConstructor; | ||
| import lombok.Getter; | ||
| import lombok.NoArgsConstructor; | ||
|
|
||
| @Getter | ||
| @NoArgsConstructor | ||
| @AllArgsConstructor | ||
| @Schema(description = "채팅방 읽음 처리 요청 DTO") | ||
| public class MarkChatRoomReadRequestDto { | ||
|
|
||
| @NotNull | ||
| @Schema(description = "마지막으로 읽은 메시지 ID") | ||
| private Long lastReadMessageId; | ||
|
|
||
| } |
12 changes: 10 additions & 2 deletions
12
.../java/com/dreamteam/alter/adapter/inbound/general/chat/dto/SendChatMessageRequestDto.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,23 @@ | ||
| package com.dreamteam.alter.adapter.inbound.general.chat.dto; | ||
|
|
||
| import com.dreamteam.alter.domain.chat.type.ChatMessageType; | ||
| import io.swagger.v3.oas.annotations.media.Schema; | ||
| import jakarta.validation.constraints.NotBlank; | ||
| import java.util.List; | ||
| import lombok.*; | ||
|
|
||
| @Getter | ||
| @NoArgsConstructor | ||
| @AllArgsConstructor | ||
| @Schema(description = "채팅 메시지 전송 요청 DTO") | ||
| public class SendChatMessageRequestDto { | ||
| @NotBlank | ||
| public static final int MAX_ATTACHMENTS = 10; | ||
|
|
||
| @Schema(description = "메시지 내용") | ||
| private String content; | ||
|
|
||
| @Schema(description = "메시지 타입(NORMAL/NOTICE), 기본 NORMAL)") | ||
| private ChatMessageType type; | ||
|
|
||
| @Schema(description = "첨부 이미지 fileId 목록", example = "[\"...\"]") | ||
| private List<String> fileIds; | ||
| } |
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
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
7 changes: 7 additions & 0 deletions
7
...va/com/dreamteam/alter/adapter/outbound/chat/persistence/ChatRoomMemberJpaRepository.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| package com.dreamteam.alter.adapter.outbound.chat.persistence; | ||
|
|
||
| import com.dreamteam.alter.domain.chat.entity.ChatRoomMember; | ||
| import org.springframework.data.jpa.repository.JpaRepository; | ||
|
|
||
| public interface ChatRoomMemberJpaRepository extends JpaRepository<ChatRoomMember, Long> { | ||
| } |
47 changes: 47 additions & 0 deletions
47
.../dreamteam/alter/adapter/outbound/chat/persistence/ChatRoomMemberQueryRepositoryImpl.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| package com.dreamteam.alter.adapter.outbound.chat.persistence; | ||
|
|
||
| import com.dreamteam.alter.domain.auth.type.TokenScope; | ||
| import com.dreamteam.alter.domain.chat.entity.ChatRoomMember; | ||
| import com.dreamteam.alter.domain.chat.entity.QChatRoomMember; | ||
| import com.dreamteam.alter.domain.chat.port.outbound.ChatRoomMemberQueryRepository; | ||
| import com.querydsl.jpa.impl.JPAQueryFactory; | ||
| import lombok.RequiredArgsConstructor; | ||
| import org.springframework.stereotype.Repository; | ||
|
|
||
| import java.util.List; | ||
| import java.util.Optional; | ||
|
|
||
| @Repository | ||
| @RequiredArgsConstructor | ||
| public class ChatRoomMemberQueryRepositoryImpl implements ChatRoomMemberQueryRepository { | ||
|
|
||
| private final JPAQueryFactory queryFactory; | ||
|
|
||
| @Override | ||
| public List<ChatRoomMember> findActiveByRoom(Long chatRoomId) { | ||
| QChatRoomMember m = QChatRoomMember.chatRoomMember; | ||
| return queryFactory.selectFrom(m) | ||
| .where(m.chatRoomId.eq(chatRoomId), m.leftAt.isNull()) | ||
| .fetch(); | ||
| } | ||
|
|
||
| @Override | ||
| public Optional<ChatRoomMember> findByRoomAndMember(Long chatRoomId, Long memberId, TokenScope memberScope) { | ||
| QChatRoomMember m = QChatRoomMember.chatRoomMember; | ||
| return Optional.ofNullable( | ||
| queryFactory.selectFrom(m) | ||
| .where(m.chatRoomId.eq(chatRoomId), m.memberId.eq(memberId), m.memberScope.eq(memberScope)) | ||
| .fetchOne() | ||
| ); | ||
| } | ||
|
|
||
| @Override | ||
| public boolean existsActive(Long chatRoomId, Long memberId, TokenScope memberScope) { | ||
| QChatRoomMember m = QChatRoomMember.chatRoomMember; | ||
| Integer hit = queryFactory.selectOne().from(m) | ||
| .where(m.chatRoomId.eq(chatRoomId), m.memberId.eq(memberId), | ||
| m.memberScope.eq(memberScope), m.leftAt.isNull()) | ||
| .fetchFirst(); | ||
| return hit != null; | ||
| } | ||
| } |
25 changes: 25 additions & 0 deletions
25
...a/com/dreamteam/alter/adapter/outbound/chat/persistence/ChatRoomMemberRepositoryImpl.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| package com.dreamteam.alter.adapter.outbound.chat.persistence; | ||
|
|
||
| import com.dreamteam.alter.domain.chat.entity.ChatRoomMember; | ||
| import com.dreamteam.alter.domain.chat.port.outbound.ChatRoomMemberRepository; | ||
| import lombok.RequiredArgsConstructor; | ||
| import org.springframework.stereotype.Repository; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| @Repository | ||
| @RequiredArgsConstructor | ||
| public class ChatRoomMemberRepositoryImpl implements ChatRoomMemberRepository { | ||
|
|
||
| private final ChatRoomMemberJpaRepository jpaRepository; | ||
|
|
||
| @Override | ||
| public ChatRoomMember save(ChatRoomMember member) { | ||
| return jpaRepository.save(member); | ||
| } | ||
|
|
||
| @Override | ||
| public List<ChatRoomMember> saveAll(List<ChatRoomMember> members) { | ||
| return jpaRepository.saveAll(members); | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.