-
Notifications
You must be signed in to change notification settings - Fork 0
#143,144,146 - 쪽지 Overview 및 디테일 조회 개발 #151
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
#143,144,146 - 쪽지 Overview 및 디테일 조회 개발 #151
Conversation
There was a problem hiding this 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 removes the deprecated MessageV2 and implements new endpoints and services to support enhanced implementation of message overview and detail retrieval in the v2 design. Key changes include:
- Removal of the old MessageV2 implementation.
- Adoption of a unified approach for obtaining a school reference via user.school instead of user.schoolId.
- Addition of new message v2 endpoints, services, and updated tests using awaitility for asynchronous assertions.
Reviewed Changes
Copilot reviewed 44 out of 44 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
domain/src/main/kotlin/com/wespot/message/MessageV2.kt | Removed the outdated MessageV2 implementation. |
core/src/main/kotlin/com/wespot/vote/service/helper/VoteServiceHelper.kt | Updated school reference from user.schoolId to user.school.id. |
core/src/main/kotlin/com/wespot/user/service/UserService.kt & SearchUserService.kt | Replaced findSchool calls with direct access to user.school. |
core/src/main/kotlin/com/wespot/notification/service/CreatedVoteNotificationService.kt | Updated school reference in notification service. |
core/src/main/kotlin/com/wespot/message/service/v2/* | Added new services for message v2 overview and detail retrieval. |
core/src/main/kotlin/com/wespot/auth/service/AuthService.kt | Updated user creation to pass school object instead of school ID. |
Various test files | Adjusted tests to use awaitility for asynchronous behavior and commented out legacy code. |
app/src/main/kotlin/com/wespot/message/v2/* | Introduced new REST controllers for message v2 endpoints. |
// isBlockedFromReceiver = blockedUserPort.existsByBlockerIdAndBlockedId( | ||
// blockerId = receiver.id, | ||
// blockedId = sender.id | ||
// ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The blocked user check is commented out. If this change is intentional, please add an explanatory comment to clarify the reason, or remove the dead code if no longer needed.
// isBlockedFromReceiver = blockedUserPort.existsByBlockerIdAndBlockedId( | |
// blockerId = receiver.id, | |
// blockedId = sender.id | |
// ) | |
isBlockedFromReceiver = blockedUserPort.existsByBlockerIdAndBlockedId( | |
blockerId = receiver.id, | |
blockedId = sender.id | |
) |
Copilot uses AI. Check for mistakes.
// // given | ||
// val fixedClock = Clock.fixed(Instant.parse("2023-03-18T18:00:00Z"), ZoneId.of("UTC")) | ||
// MessageTimeValidator.setClock(fixedClock) | ||
// | ||
// val sender = userPort.save(UserFixture.createWithIdAndEmail(0, "Test1@KAKAO")) | ||
// UserFixture.setSecurityContextUser(sender) | ||
// val receiver = userPort.save(UserFixture.createWithIdAndEmail(0, "Test2@KAKAO")) | ||
// val message = messagePort.save( | ||
// Message.sendMessage( | ||
// content = "content", | ||
// receiver = receiver, | ||
// sender = sender, | ||
// senderName = sender.name, | ||
// isAnonymous = false | ||
// ) | ||
// ) | ||
// | ||
// // when | ||
// eventPublisher.publishEvent( | ||
// ReceivedMessageEvent( | ||
// receiver = receiver, | ||
// messageId = message.id | ||
// ) | ||
// ) | ||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] There is a significant block of test code that has been commented out. Consider removing these redundant sections or adding a note if they are kept for reference.
// // given | |
// val fixedClock = Clock.fixed(Instant.parse("2023-03-18T18:00:00Z"), ZoneId.of("UTC")) | |
// MessageTimeValidator.setClock(fixedClock) | |
// | |
// val sender = userPort.save(UserFixture.createWithIdAndEmail(0, "Test1@KAKAO")) | |
// UserFixture.setSecurityContextUser(sender) | |
// val receiver = userPort.save(UserFixture.createWithIdAndEmail(0, "Test2@KAKAO")) | |
// val message = messagePort.save( | |
// Message.sendMessage( | |
// content = "content", | |
// receiver = receiver, | |
// sender = sender, | |
// senderName = sender.name, | |
// isAnonymous = false | |
// ) | |
// ) | |
// | |
// // when | |
// eventPublisher.publishEvent( | |
// ReceivedMessageEvent( | |
// receiver = receiver, | |
// messageId = message.id | |
// ) | |
// ) | |
// | |
// Removed commented-out test code block for clarity and maintainability. | |
// |
Copilot uses AI. Check for mistakes.
@@ -28,47 +30,48 @@ class RealSendMessageServiceTest @Autowired constructor( | |||
|
|||
@Test | |||
fun `쪽지를 3개 보냈을 때, 쪽지 독려 알림이 비활성화된다`() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Several lines of commented-out test code are present in this file. It is recommended to either remove this obsolete code or document why it is retained for future reference.
fun `쪽지를 3개 보냈을 때, 쪽지 독려 알림이 비활성화된다`() { | |
fun `쪽지를 3개 보냈을 때, 쪽지 독려 알림이 비활성화된다`() { | |
// The following test code is commented out and retained for future debugging or development purposes. | |
// It demonstrates a scenario where sending 3 messages disables a notification. | |
// Uncomment and modify as needed when implementing or debugging related functionality. |
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope i don't want
1. 🔗 관련 이슈
closes #143
closes #144
closes #146
2. 📄 구현한 내용 또는 수정한 내용
3. 🙌 추가적으로 알리고 싶은 내용
4. 🙄 TODO / 고민하고 있는 것들
5. ✅ 배포 Checklist