Skip to content

#150, 158, 167 - 에버 관련한 기능 구현 수정 및 쪽지 읽음 처리를 수정합니다. #168

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

Merged

Conversation

kpeel5839
Copy link
Contributor

1. 🔗 관련 이슈

closes #150
closes #158
closes #167

2. 📄 구현한 내용 또는 수정한 내용

  • 에버 프로필 설정 DB에서 변경했습니다.
  • v2 버전으로 에버 웰컴 메시지 생성할 수 있도록 했습니다.
  • 쪽지 읽음 처리를 API를 통해서가 아닌, 디테일 조회시 알아서 처리될 수 있도록 했습니다.

3. ✅ 배포 Checklist

  • 본인을 Assign 해주세요.

@kpeel5839 kpeel5839 requested a review from Copilot May 6, 2025 14:23
@kpeel5839 kpeel5839 self-assigned this May 6, 2025
@kpeel5839 kpeel5839 added ✏️수정 요청✏️ 수정해주셔! 🌱기능🌱 새로운 기능을 추가해요 ! 🏋️매튜🏋️ 24기 김재연 labels May 6, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements modifications related to the 에버 기능 by updating the user profile configuration, enabling v2 welcome messages, and automating message read status updates upon detail view.

  • Updated repository and persistence layers to support lookup by name.
  • Modified message creation and welcome message processing logic for v2 functionality.
  • Added new methods for handling unread messages in message detail views.

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
infrastructure/mysql/src/main/kotlin/com/wespot/user/repository/UserJpaRepository.kt Added findByName query method to support user retrieval by name.
infrastructure/mysql/src/main/kotlin/com/wespot/user/adapter/UserPersistenceAdapter.kt Implemented new findByName function mapping JPA entity to domain entity.
domain/src/main/kotlin/com/wespot/user/User.kt Made EVER_NAME public for external access.
domain/src/main/kotlin/com/wespot/message/v2/MessageV2.kt Modified welcome message creation; publish event after saving message.
domain/src/main/kotlin/com/wespot/message/v2/MessageRoom.kt Added a method for reading unread messages.
domain/src/main/kotlin/com/wespot/message/v2/MessageDetails.kt Introduced readUnreadMessage function to mark messages as read.
core/src/main/kotlin/com/wespot/message/service/v2/GetMessageV2Service.kt Updated flow to mark messages as read immediately after constructing response.
core/src/main/kotlin/com/wespot/message/service/v2/CreatedMessageV2Service.kt Updated message creation process and added welcome message handling with a new transactional boundary.
core/src/main/kotlin/com/wespot/message/service/listener/MessageEventListener.kt Added async listener for v2 welcome message events.
core/src/main/kotlin/com/wespot/message/port/in/CreatedMessageV2UseCase.kt Extended interface with welcomeMessage function.
Comments suppressed due to low confidence (1)

domain/src/main/kotlin/com/wespot/message/v2/MessageDetails.kt:68

  • [nitpick] Consider renaming the method to readUnreadMessages to clearly indicate that multiple messages are returned, aligning with its usage in MessageRoom.
fun readUnreadMessage(viewer: User): List<MessageV2> {

Comment on lines +75 to +77
val response = MessageV2DetailsResponse.from(room = room)
room.readUnreadMessages()
.forEach { messageV2Port.save(it) }
Copy link
Preview

Copilot AI May 6, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider marking unread messages as read before constructing the response to ensure that the returned data reflects the updated read status.

Suggested change
val response = MessageV2DetailsResponse.from(room = room)
room.readUnreadMessages()
.forEach { messageV2Port.save(it) }
room.readUnreadMessages()
.forEach { messageV2Port.save(it) }
val response = MessageV2DetailsResponse.from(room = room)

Copilot uses AI. Check for mistakes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no my intention isn't like that

@kpeel5839 kpeel5839 merged commit 93c1361 into develop May 6, 2025
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✏️수정 요청✏️ 수정해주셔! 🌱기능🌱 새로운 기능을 추가해요 ! 🏋️매튜🏋️ 24기 김재연
Projects
None yet
1 participant