Skip to content

[FEAT] 매칭 완료 카드에 제안 방향 추가#324

Merged
1000hyehyang merged 2 commits intodevfrom
fix/323-chat
Feb 8, 2026
Merged

[FEAT] 매칭 완료 카드에 제안 방향 추가#324
1000hyehyang merged 2 commits intodevfrom
fix/323-chat

Conversation

@1000hyehyang
Copy link
Copy Markdown
Member

Summary

채팅 매칭 완료 카드(MATCHED_CAMPAIGN_CARD)에 누가 제안했는지를 나타내는 proposalDirection 필드를 추가했습니다.
프론트에서 "제안한 사람 / 받은 사람"에 따라 카드 문구·UI를 다르게 보여줄 수 있습니다.

  • 비즈니스 이벤트채팅 이벤트시스템 메시지 payload까지 방향 정보를 일관되게 전달
  • campaignId가 null인 경우 매칭 카드 미전송 및 NPE 방지 처리
  • PRD·API 가이드 등 채팅 문서 반영

Changes

  • 비즈니스
    • CampaignProposalStatusChangedEvent: ProposalDirection proposalDirection 필드 추가
    • CampaignProposalService.publishProposalStatusChangedEvent: ProposalDirection.fromWhoProposed(proposal.getWhoProposed())로 설정 후 발행
  • 채팅 이벤트
    • ProposalStatusChangedEvent: ChatProposalDirection proposalDirection 필드 추가
    • CampaignProposalStatusChangedEventListener: 비즈니스 ProposalDirectionChatProposalDirection 변환 후 내부 이벤트에 포함
  • 채팅 payload·서비스
    • ChatMatchedCampaignPayloadResponse: ChatProposalDirection proposalDirection 필드 추가
    • MatchedCampaignPayloadProvider: getPayload(Long campaignId, ChatProposalDirection proposalDirection) 시그니처로 변경
    • MatchedCampaignPayloadProviderImpl: 전달받은 proposalDirection을 payload에 포함
    • ProposalSystemMessageHandler: 매칭 카드 생성 시 event.proposalDirection() 전달, campaignId가 null이면 매칭 카드 전송 생략 (NPE 방지)
  • 문서
    • chat-api-guide.md: MATCHED_CAMPAIGN_CARD payload에 proposalDirection 설명 및 프론트 분기 가이드
    • chat-system-architecture.md: MATCHED_CAMPAIGN_CARD payload 예시에 proposalDirection 추가
    • chat-rest-api.md: 메시지 예시 payload에 proposalDirection 추가
    • chat-dto.md: 매칭 카드 payload 항목에 제안 방향 추가

Type of Change

  • Bug fix (기존 기능에 영향을 주지 않는 버그 수정)
  • New feature (기존 기능에 영향을 주지 않는 새로운 기능 추가)
  • Breaking change (기존 기능에 영향을 주는 수정)
  • Refactoring (기능 변경 없는 코드 개선)
  • Documentation (문서 수정)
  • Chore (빌드, 설정 등 기타 변경)
  • Release (develop → main 배포)

Related Issues

Closes #323

참고 사항

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @1000hyehyang, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 매칭 완료 카드(MATCHED_CAMPAIGN_CARD)에 제안 방향 정보를 포함시켜 프론트엔드에서 제안 주체에 따라 다른 UI나 문구를 표시할 수 있도록 지원합니다. 비즈니스 로직에서 발생한 제안 상태 변경 이벤트가 채팅 시스템 메시지 페이로드로 전달되는 전 과정에서 제안 방향 정보가 누락 없이 일관되게 유지되도록 데이터 흐름을 개선하고, 특정 조건에서 발생할 수 있는 잠재적인 오류를 방지하여 시스템의 안정성을 높였습니다.

Highlights

  • 매칭 완료 카드에 제안 방향 정보 추가: 매칭 완료 카드(MATCHED_CAMPAIGN_CARD) 페이로드에 proposalDirection 필드를 추가하여 누가 제안했는지(브랜드 또는 크리에이터)를 나타내도록 변경되었습니다. 이는 프론트엔드에서 제안 주체에 따라 다른 UI나 문구를 표시할 수 있도록 지원합니다.
  • 이벤트 전반에 걸쳐 제안 방향 일관성 유지: 비즈니스 이벤트(CampaignProposalStatusChangedEvent)부터 채팅 모듈 내부 이벤트(ProposalStatusChangedEvent) 및 최종 시스템 메시지 페이로드까지 proposalDirection 정보가 누락 없이 일관되게 전달되도록 데이터 흐름이 개선되었습니다.
  • 매칭 카드 전송 시 NPE 방지: campaignIdnull인 경우 매칭 완료 카드가 전송되지 않도록 ProposalSystemMessageHandler 로직이 개선되어 NullPointerException 발생 가능성을 제거했습니다.
Changelog
  • src/main/java/com/example/RealMatch/business/application/event/CampaignProposalStatusChangedEvent.java
    • ProposalDirection proposalDirection 필드를 추가하여 제안 방향 정보를 포함하도록 변경되었습니다.
  • src/main/java/com/example/RealMatch/business/application/service/CampaignProposalService.java
    • publishProposalStatusChangedEvent 메서드에서 CampaignProposalStatusChangedEvent 발행 시 proposal.getWhoProposed()로부터 ProposalDirection을 추출하여 이벤트에 포함하도록 수정되었습니다.
  • src/main/java/com/example/RealMatch/chat/application/event/proposal/CampaignProposalStatusChangedEventListener.java
    • 비즈니스 도메인의 ProposalDirection을 채팅 도메인의 ChatProposalDirection으로 변환하는 toChatProposalDirection 메서드가 추가되었습니다.
    • ProposalStatusChangedEvent를 생성할 때 변환된 ChatProposalDirection을 포함하도록 로직이 업데이트되었습니다.
  • src/main/java/com/example/RealMatch/chat/application/event/proposal/ProposalStatusChangedEvent.java
    • 채팅 모듈 내부 이벤트인 ProposalStatusChangedEventChatProposalDirection proposalDirection 필드가 추가되었습니다.
  • src/main/java/com/example/RealMatch/chat/application/event/proposal/ProposalSystemMessageHandler.java
    • 매칭 완료 카드 전송 조건에 event.campaignId() != null을 추가하여 campaignId가 없는 경우 매칭 카드를 전송하지 않도록 수정되었습니다.
    • matchedCampaignPayloadProvider.getPayload 호출 시 event.proposalDirection()을 함께 전달하도록 변경되었습니다.
  • src/main/java/com/example/RealMatch/chat/application/service/room/MatchedCampaignPayloadProvider.java
    • getPayload 메서드 시그니처에 ChatProposalDirection proposalDirection 파라미터가 추가되었습니다.
  • src/main/java/com/example/RealMatch/chat/application/service/room/MatchedCampaignPayloadProviderImpl.java
    • getPayloadtoPayload 메서드가 ChatProposalDirection 파라미터를 받도록 업데이트되었으며, null인 경우 ChatProposalDirection.NONE으로 처리하도록 로직이 추가되었습니다.
  • src/main/java/com/example/RealMatch/chat/presentation/dto/response/ChatMatchedCampaignPayloadResponse.java
    • 최종 페이로드 응답 DTO인 ChatMatchedCampaignPayloadResponseChatProposalDirection proposalDirection 필드가 추가되었습니다.
Activity
  • 이 PR은 아직 생성된 지 얼마 되지 않아 특별한 리뷰 활동이나 코멘트가 없습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

PR은 매칭 완료 카드에 proposalDirection 필드를 성공적으로 추가하여, 비즈니스 이벤트부터 채팅 시스템 메시지 페이로드까지 제안 방향 정보를 일관되게 전달하도록 개선했습니다. 이를 통해 프론트엔드에서 제안 방향에 따라 다른 UI를 표시할 수 있게 되었습니다. 또한 campaignId가 null일 경우 매칭 카드를 전송하지 않도록 처리하여 NPE 발생 가능성을 방지한 점도 좋은 개선입니다. 전반적으로 변경 사항은 명확하고 논리적으로 잘 구현되었습니다. 코드의 견고성을 높이는 과정에서 발생한 중복 검사를 제거하여 코드를 더 간결하게 만들 수 있으며, 아키텍처 일관성을 위해 isDeleted 검사 위치를 조정하는 것을 고려해볼 수 있습니다.

@1000hyehyang 1000hyehyang merged commit 80b67ea into dev Feb 8, 2026
1 check passed
@1000hyehyang 1000hyehyang deleted the fix/323-chat branch February 8, 2026 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FIX] 채팅 시스템 메시지에 누가 보냈는지 필드 추가

1 participant