Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -93,24 +93,34 @@ public CommentCreateResponse createComment(CommentCreateCommand command) {
private void sendNotificationsToPostWriter(PostQueryDto postQueryDto, User actorUser) {
if (postQueryDto.creatorId().equals(actorUser.getId())) return; // 자신이 작성한 게시글 제외

if (postQueryDto.postType().equals(FEED.getType())) {
// 피드 댓글 알림 이벤트 발행
feedNotificationOrchestrator.notifyFeedCommented(postQueryDto.creatorId(), actorUser.getId(), actorUser.getNickname(), postQueryDto.postId());
} else if (postQueryDto.postType().equals(RECORD.getType()) || postQueryDto.postType().equals(VOTE.getType())) {
// 모임방 게시글 댓글 알림 이벤트 발행
roomNotificationOrchestrator.notifyRoomPostCommented(postQueryDto.creatorId(), actorUser.getId(), actorUser.getNickname(), postQueryDto.roomId(), postQueryDto.page(), postQueryDto.postId(), postQueryDto.postType());
PostType postType = PostType.from(postQueryDto.postType());
switch (postType) {
case FEED -> // 피드 댓글 알림 이벤트 발행
feedNotificationOrchestrator.notifyFeedCommented(
postQueryDto.creatorId(), actorUser.getId(), actorUser.getNickname(), postQueryDto.postId()
);
case RECORD, VOTE -> // 모임방 게시글 댓글 알림 이벤트 발행
roomNotificationOrchestrator.notifyRoomPostCommented(
postQueryDto.creatorId(), actorUser.getId(), actorUser.getNickname(),
postQueryDto.roomId(), postQueryDto.page(), postQueryDto.postId(), postType
);
}
}

private void sendNotificationsToParentCommentWriter(PostQueryDto postQueryDto, CommentQueryDto parentCommentDto, User actorUser) {
if (parentCommentDto.creatorId().equals(actorUser.getId())) return; // 자신이 작성한 댓글 제외

if (postQueryDto.postType().equals(FEED.getType())) {
// 피드 답글 알림 이벤트 발행
feedNotificationOrchestrator.notifyFeedReplied(parentCommentDto.creatorId(), actorUser.getId(), actorUser.getNickname(), postQueryDto.postId());
} else if (postQueryDto.postType().equals(RECORD.getType()) || postQueryDto.postType().equals(VOTE.getType())) {
// 모임방 게시글 답글 알림 이벤트 발행
roomNotificationOrchestrator.notifyRoomPostCommentReplied(parentCommentDto.creatorId(), actorUser.getId(), actorUser.getNickname(), postQueryDto.roomId(), postQueryDto.page(), postQueryDto.postId(), postQueryDto.postType());
PostType postType = PostType.from(postQueryDto.postType());
switch (postType) {
case FEED -> // 피드 답글 알림 이벤트 발행
feedNotificationOrchestrator.notifyFeedReplied(
parentCommentDto.creatorId(), actorUser.getId(), actorUser.getNickname(), postQueryDto.postId()
);
case RECORD, VOTE -> // 모임방 게시글 답글 알림 이벤트 발행
roomNotificationOrchestrator.notifyRoomPostCommentReplied(
parentCommentDto.creatorId(), actorUser.getId(), actorUser.getNickname(),
postQueryDto.roomId(), postQueryDto.page(), postQueryDto.postId(), postType
);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,19 @@ private void sendNotifications(CommentIsLikeCommand command, Comment comment) {
if (command.userId().equals(comment.getCreatorId())) return; // 자신의 댓글에 좋아요 누르는 경우 제외

User actorUser = userCommandPort.findById(command.userId());
// 좋아요 푸쉬알림 전송
if (comment.getPostType() == PostType.FEED) {
feedNotificationOrchestrator.notifyFeedCommentLiked(comment.getCreatorId(), actorUser.getId(), actorUser.getNickname(), comment.getTargetPostId());
}
if (comment.getPostType() == PostType.RECORD || comment.getPostType() == PostType.VOTE) {
PostQueryDto postQueryDto = postHandler.getPostQueryDto(comment.getPostType(), comment.getTargetPostId());
roomNotificationOrchestrator.notifyRoomCommentLiked(comment.getCreatorId(), actorUser.getId(), actorUser.getNickname(), postQueryDto.roomId(), postQueryDto.page(), postQueryDto.postId(), postQueryDto.postType());
PostType postType = comment.getPostType();

switch (postType) {
case FEED ->
feedNotificationOrchestrator.notifyFeedCommentLiked(
comment.getCreatorId(), actorUser.getId(), actorUser.getNickname(),comment.getTargetPostId()
);
case RECORD, VOTE -> {
PostQueryDto postQueryDto = postHandler.getPostQueryDto(comment.getPostType(), comment.getTargetPostId());
roomNotificationOrchestrator.notifyRoomCommentLiked(
comment.getCreatorId(), actorUser.getId(), actorUser.getNickname(), postQueryDto.roomId(), postQueryDto.page(), postQueryDto.postId(), postType
);
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package konkuk.thip.notification.application.port.in;

import konkuk.thip.post.domain.PostType;

public interface RoomNotificationOrchestrator {

/**
Expand All @@ -9,7 +11,7 @@ public interface RoomNotificationOrchestrator {

// ===== Room 영역 =====
void notifyRoomPostCommented(Long targetUserId, Long actorUserId, String actorUsername,
Long roomId, Integer page, Long postId, String postType);
Long roomId, Integer page, Long postId, PostType postType);

void notifyRoomVoteStarted(Long targetUserId, Long roomId, String roomTitle, Integer page, Long postId);

Expand All @@ -24,11 +26,11 @@ void notifyRoomJoinToHost(Long hostUserId, Long roomId, String roomTitle,
Long actorUserId, String actorUsername);

void notifyRoomCommentLiked(Long targetUserId, Long actorUserId, String actorUsername,
Long roomId, Integer page, Long postId, String postType);
Long roomId, Integer page, Long postId, PostType postType);

void notifyRoomPostLiked(Long targetUserId, Long actorUserId, String actorUsername,
Long roomId, Integer page, Long postId, String postType);
Long roomId, Integer page, Long postId, PostType postType);

void notifyRoomPostCommentReplied(Long targetUserId, Long actorUserId, String actorUsername,
Long roomId, Integer page, Long postId, String postType);
Long roomId, Integer page, Long postId, PostType postType);
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import konkuk.thip.notification.application.service.template.room.*;
import konkuk.thip.notification.domain.value.MessageRoute;
import konkuk.thip.notification.domain.value.NotificationRedirectSpec;
import konkuk.thip.post.domain.PostType;
import lombok.RequiredArgsConstructor;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
Expand All @@ -30,18 +31,10 @@ public class RoomNotificationOrchestratorSyncImpl implements RoomNotificationOrc
@Override
@Transactional(propagation = Propagation.MANDATORY)
public void notifyRoomPostCommented(Long targetUserId, Long actorUserId, String actorUsername,
Long roomId, Integer page, Long postId, String postType) {
Long roomId, Integer page, Long postId, PostType postType) {
var args = new RoomPostCommentedTemplate.Args(actorUsername);

NotificationRedirectSpec redirectSpec = new NotificationRedirectSpec(
MessageRoute.ROOM_POST_DETAIL,
Map.of(
"roomId", roomId,
"page", page,
"postId", postId,
"postType", postType
)
);
NotificationRedirectSpec redirectSpec = createRoomPostWithCommentsRedirectSpec(roomId, page, postId, postType);

notificationSyncExecutor.execute(
RoomPostCommentedTemplate.INSTANCE,
Expand All @@ -59,15 +52,7 @@ public void notifyRoomPostCommented(Long targetUserId, Long actorUserId, String
public void notifyRoomVoteStarted(Long targetUserId, Long roomId, String roomTitle, Integer page, Long postId) {
var args = new RoomVoteStartedTemplate.Args(roomTitle);

NotificationRedirectSpec redirectSpec = new NotificationRedirectSpec(
MessageRoute.ROOM_VOTE_DETAIL,
Map.of(
"roomId", roomId,
"page", page,
"postId", postId,
"postType", "VOTE"
)
);
NotificationRedirectSpec redirectSpec = createRoomPostRedirectSpec(roomId, page, postId, PostType.VOTE);

notificationSyncExecutor.execute(
RoomVoteStartedTemplate.INSTANCE,
Expand All @@ -86,15 +71,7 @@ public void notifyRoomRecordCreated(Long targetUserId, Long actorUserId, String
Long roomId, String roomTitle, Integer page, Long postId) {
var args = new RoomRecordCreatedTemplate.Args(roomTitle, actorUsername);

NotificationRedirectSpec redirectSpec = new NotificationRedirectSpec(
MessageRoute.ROOM_RECORD_DETAIL,
Map.of(
"roomId", roomId,
"page", page,
"postId", postId,
"postType", "RECORD"
)
);
NotificationRedirectSpec redirectSpec = createRoomPostRedirectSpec(roomId, page, postId, PostType.RECORD);

notificationSyncExecutor.execute(
RoomRecordCreatedTemplate.INSTANCE,
Expand Down Expand Up @@ -173,18 +150,10 @@ public void notifyRoomJoinToHost(Long hostUserId, Long roomId, String roomTitle,
@Override
@Transactional(propagation = Propagation.MANDATORY)
public void notifyRoomCommentLiked(Long targetUserId, Long actorUserId, String actorUsername,
Long roomId, Integer page, Long postId, String postType) {
Long roomId, Integer page, Long postId, PostType postType) {
var args = new RoomCommentLikedTemplate.Args(actorUsername);

NotificationRedirectSpec redirectSpec = new NotificationRedirectSpec(
MessageRoute.ROOM_POST_DETAIL,
Map.of(
"roomId", roomId,
"page", page,
"postId", postId,
"postType", postType
)
);
NotificationRedirectSpec redirectSpec = createRoomPostWithCommentsRedirectSpec(roomId, page, postId, postType);

notificationSyncExecutor.execute(
RoomCommentLikedTemplate.INSTANCE,
Expand All @@ -200,18 +169,10 @@ public void notifyRoomCommentLiked(Long targetUserId, Long actorUserId, String a
@Override
@Transactional(propagation = Propagation.MANDATORY)
public void notifyRoomPostLiked(Long targetUserId, Long actorUserId, String actorUsername,
Long roomId, Integer page, Long postId, String postType) {
Long roomId, Integer page, Long postId, PostType postType) {
var args = new RoomPostLikedTemplate.Args(actorUsername);

NotificationRedirectSpec redirectSpec = new NotificationRedirectSpec(
MessageRoute.ROOM_POST_DETAIL,
Map.of(
"roomId", roomId,
"page", page,
"postId", postId,
"postType", postType
)
);
NotificationRedirectSpec redirectSpec = createRoomPostRedirectSpec(roomId, page, postId, postType);

notificationSyncExecutor.execute(
RoomPostLikedTemplate.INSTANCE,
Expand All @@ -227,18 +188,10 @@ public void notifyRoomPostLiked(Long targetUserId, Long actorUserId, String acto
@Override
@Transactional(propagation = Propagation.MANDATORY)
public void notifyRoomPostCommentReplied(Long targetUserId, Long actorUserId, String actorUsername,
Long roomId, Integer page, Long postId, String postType) {
Long roomId, Integer page, Long postId, PostType postType) {
var args = new RoomPostCommentRepliedTemplate.Args(actorUsername);

NotificationRedirectSpec redirectSpec = new NotificationRedirectSpec(
MessageRoute.ROOM_POST_DETAIL,
Map.of(
"roomId", roomId,
"page", page,
"postId", postId,
"postType", postType
)
);
NotificationRedirectSpec redirectSpec = createRoomPostWithCommentsRedirectSpec(roomId, page, postId, postType);

notificationSyncExecutor.execute(
RoomPostCommentRepliedTemplate.INSTANCE,
Expand All @@ -250,4 +203,30 @@ public void notifyRoomPostCommentReplied(Long targetUserId, Long actorUserId, St
)
);
}

private NotificationRedirectSpec createRoomPostWithCommentsRedirectSpec(Long roomId, Integer page, Long postId, PostType postType) {
return new NotificationRedirectSpec(
MessageRoute.ROOM_POST_DETAIL,
Map.of(
"roomId", roomId,
"page", page,
"postId", postId,
"postType", postType,
"openComments", true
)
);
}

private NotificationRedirectSpec createRoomPostRedirectSpec(Long roomId, Integer page, Long postId, PostType postType) {
return new NotificationRedirectSpec(
MessageRoute.ROOM_POST_DETAIL,
Map.of(
"roomId", roomId,
"page", page,
"postId", postId,
"postType", postType,
"openComments", false
)
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,5 @@ public enum MessageRoute {
// ROOM
ROOM_MAIN, // 특정 모임방 메인 화면으로 이동
ROOM_DETAIL, // 특정 모임 상세정보 화면으로 이동
ROOM_POST_DETAIL, // 특정 모임 게시글 상세 화면으로 이동 -> PostType으로 투표인지 기록인지 판단
ROOM_RECORD_DETAIL, // 특정 모임 기록 상세 화면으로 이동 (기록장 조회 - 페이지 필터 걸린채로)
ROOM_VOTE_DETAIL; // 특정 모임 투표 상세 화면으로 이동 (투표 조회 - 페이지 필터 걸린채로)
ROOM_POST_DETAIL, // 특정 모임 게시글 상세 화면으로 이동 -> PostType으로 투표(VOTE)인지 기록(RECORD)인지 판단
Copy link

@coderabbitai coderabbitai bot Sep 25, 2025

Choose a reason for hiding this comment

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

⚠️ Potential issue

기존 알림 레코드 역직렬화가 실패합니다.

현재 DB/캐시에는 ROOM_RECORD_DETAIL, ROOM_VOTE_DETAIL 값으로 저장된 알림이 이미 존재합니다. 이 enum 상수를 제거하면 Enum.valueOf/JPA 매핑 과정에서 IllegalArgumentException이 발생하여 알림 조회 자체가 실패합니다. 배포 전에 데이터 마이그레이션이 보장되지 않는다면, 최소한 레거시 상수를 남겨두고 내부 로직에서 ROOM_POST_DETAIL로 매핑하는 완충 장치가 필요합니다.

예시 수정안:

     ROOM_DETAIL,            // 특정 모임 상세정보 화면으로 이동
-    ROOM_POST_DETAIL,       // 특정 모임 게시글 상세 화면으로 이동 -> PostType으로 투표(VOTE)인지 기록(RECORD)인지 판단
+    @Deprecated
+    ROOM_RECORD_DETAIL,     // Legacy: PostType.RECORD로 해석
+    @Deprecated
+    ROOM_VOTE_DETAIL,       // Legacy: PostType.VOTE로 해석
+    ROOM_POST_DETAIL,       // 특정 모임 게시글 상세 화면으로 이동 -> PostType으로 투표(VOTE)인지 기록(RECORD)인지 판단

레거시 값을 허용하되, 새 알림 생성 시에는 ROOM_POST_DETAIL만 사용하도록 다른 계층에서 제한하는 방식으로 전환해 주세요.

🤖 Prompt for AI Agents
In src/main/java/konkuk/thip/notification/domain/value/MessageRoute.java around
line 19, removing legacy enum constants (ROOM_RECORD_DETAIL, ROOM_VOTE_DETAIL)
causes Enum.valueOf/JPA deserialization failures for existing DB/cache records;
restore those legacy constants in the enum (marking them as deprecated if
desired) and implement a mapping layer in the enum (or a helper method) that
maps legacy constants to the new canonical value ROOM_POST_DETAIL for runtime
logic, while ensuring any new notifications are created using only
ROOM_POST_DETAIL at higher layers.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

아직 알림 부분은 개발 단계여서 기존 데이터를 전부 삭제하는 것으로 정했어!

Copy link

Choose a reason for hiding this comment

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

@seongjunnoh 명확한 설명 감사합니다!

알림 기능이 아직 개발 단계이고 기존 데이터를 모두 삭제할 계획이라면, ROOM_RECORD_DETAILROOM_VOTE_DETAIL enum 상수 제거에 따른 역직렬화 문제는 발생하지 않겠네요. 깔끔한 데이터 구조로 새롭게 시작하는 것이 개발 단계에서는 적절한 접근 방식입니다.

이 경우 현재의 리팩토링이 안전하게 진행될 수 있습니다. 🎉


✏ Learnings added
Learnt from: seongjunnoh
PR: THIP-TextHip/THIP-Server#315
File: src/main/java/konkuk/thip/notification/domain/value/MessageRoute.java:19-19
Timestamp: 2025-09-25T02:39:46.795Z
Learning: seongjunnoh는 아직 개발 단계인 기능에 대해서는 기존 데이터를 삭제하고 새롭게 시작하는 방식을 선호하며, 이를 통해 breaking change 없이 깔끔한 리팩토링을 진행한다.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.


🧠 Learnings used
Learnt from: seongjunnoh
PR: THIP-TextHip/THIP-Server#113
File: src/main/java/konkuk/thip/recentSearch/adapter/out/persistence/RecentSearchCommandPersistenceAdapter.java:38-44
Timestamp: 2025-07-30T14:05:04.945Z
Learning: seongjunnoh는 코드 최적화 제안에 대해 구체적인 기술적 근거와 효율성 차이를 이해하고 싶어하며, 성능 개선 방식에 대한 상세한 설명을 선호한다.

Learnt from: seongjunnoh
PR: THIP-TextHip/THIP-Server#93
File: src/main/java/konkuk/thip/room/adapter/out/persistence/RoomQueryPersistenceAdapter.java:49-114
Timestamp: 2025-07-28T16:44:31.224Z
Learning: seongjunnoh는 코드 중복 문제에 대한 리팩토링 제안을 적극적으로 수용하고 함수형 인터페이스를 활용한 해결책을 선호한다.

Learnt from: seongjunnoh
PR: THIP-TextHip/THIP-Server#285
File: src/main/java/konkuk/thip/room/adapter/out/jpa/RoomStatus.java:1-7
Timestamp: 2025-08-31T05:25:14.845Z
Learning: seongjunnoh는 enum 의존성에 대해 유연한 접근을 선호하며, 도메인→어댑터 레이어 참조와 같은 아키텍처 layering 원칙보다 실용적인 구현을 우선시한다.

Learnt from: seongjunnoh
PR: THIP-TextHip/THIP-Server#195
File: src/main/java/konkuk/thip/feed/application/mapper/FeedQueryMapper.java:0-0
Timestamp: 2025-08-13T05:22:32.287Z
Learning: seongjunnoh는 데이터 무결성과 중복 방지에 대한 고민이 깊으며, LinkedHashSet을 활용한 중복 제거와 순서 보장을 동시에 달성하는 솔루션을 선호한다.

Learnt from: seongjunnoh
PR: THIP-TextHip/THIP-Server#305
File: src/main/java/konkuk/thip/notification/adapter/out/persistence/repository/NotificationQueryRepository.java:9-13
Timestamp: 2025-09-17T06:40:49.863Z
Learning: seongjunnoh는 메서드 네이밍 시 구현 세부사항보다 비즈니스 의도를 반영하는 것을 선호하며, 미래 확장성과 아키텍처 변화를 고려한 설계 철학을 가지고 있다.

Learnt from: seongjunnoh
PR: THIP-TextHip/THIP-Server#278
File: src/main/java/konkuk/thip/TestTokenController.java:0-0
Timestamp: 2025-08-24T09:33:52.982Z
Learning: seongjunnoh는 Spring의 ConditionalOnProperty 동작 원리를 정확히 이해하고 있으며, 보안 이슈에 대해서도 실질적인 위험성을 기준으로 판단하는 실용적 접근을 선호한다.

Learnt from: seongjunnoh
PR: THIP-TextHip/THIP-Server#278
File: src/main/java/konkuk/thip/common/exception/code/ErrorCode.java:210-211
Timestamp: 2025-08-24T09:40:48.595Z
Learning: seongjunnoh는 HTTP 상태 코드 선택에 대해 기술적 근거와 코드베이스 내 일관성을 중요하게 생각하며, 구체적인 사례 분석을 통한 설명을 선호한다.

Learnt from: seongjunnoh
PR: THIP-TextHip/THIP-Server#180
File: src/main/java/konkuk/thip/room/application/service/AttendanceCheckCreateService.java:22-40
Timestamp: 2025-08-14T09:15:31.371Z
Learning: seongjunnoh는 기술적 완벽성보다 실제 비즈니스 시나리오와 사용자 행동 패턴을 우선 고려하며, 발생 가능성이 낮은 엣지 케이스보다는 실용적인 구현을 선호한다.

Learnt from: seongjunnoh
PR: THIP-TextHip/THIP-Server#112
File: src/main/java/konkuk/thip/feed/adapter/out/persistence/repository/FeedQueryRepositoryImpl.java:272-272
Timestamp: 2025-07-30T10:44:34.115Z
Learning: seongjunnoh는 피드 커서 페이지네이션에서 LocalDateTime 단일 커서 방식을 선호하며, 복합 키 기반 커서보다 구현 단순성과 성능을 우선시한다.

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,19 @@

import konkuk.thip.common.exception.EntityNotFoundException;
import konkuk.thip.post.adapter.out.persistence.repository.PostLikeJpaRepository;
import konkuk.thip.feed.adapter.out.jpa.FeedJpaEntity;
import konkuk.thip.post.domain.PostType;
import konkuk.thip.feed.adapter.out.persistence.repository.FeedJpaRepository;
import konkuk.thip.post.adapter.out.jpa.PostJpaEntity;
import konkuk.thip.post.adapter.out.mapper.PostLikeMapper;
import konkuk.thip.post.application.port.out.PostLikeCommandPort;
import konkuk.thip.roompost.adapter.out.jpa.RecordJpaEntity;
import konkuk.thip.roompost.adapter.out.jpa.VoteJpaEntity;
import konkuk.thip.roompost.adapter.out.persistence.repository.record.RecordJpaRepository;
import konkuk.thip.user.adapter.out.jpa.UserJpaEntity;
import konkuk.thip.user.adapter.out.persistence.repository.UserJpaRepository;
import konkuk.thip.roompost.adapter.out.persistence.repository.vote.VoteJpaRepository;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

import static konkuk.thip.common.exception.code.ErrorCode.*;
import static konkuk.thip.common.exception.code.ErrorCode.RECORD_NOT_FOUND;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import konkuk.thip.post.application.port.out.PostLikeCommandPort;
import konkuk.thip.post.application.port.out.PostLikeQueryPort;
import konkuk.thip.post.application.service.validator.PostLikeAuthorizationValidator;
import konkuk.thip.post.domain.PostType;
import konkuk.thip.post.domain.service.PostCountService;
import konkuk.thip.user.application.port.out.UserCommandPort;
import konkuk.thip.user.domain.User;
Expand Down Expand Up @@ -69,15 +68,20 @@ public PostIsLikeResult changeLikeStatusPost(PostIsLikeCommand command) {
private void sendNotifications(PostIsLikeCommand command) {
PostQueryDto postQueryDto = postHandler.getPostQueryDto(command.postType(), command.postId());

if(command.userId().equals(postQueryDto.creatorId())) return; // 자신의 게시글에 좋아요 누르는 경우 제외
if (command.userId().equals(postQueryDto.creatorId())) return; // 자신의 게시글에 좋아요 누르는 경우 제외

User actorUser = userCommandPort.findById(command.userId());
// 좋아요 푸쉬알림 전송
if (command.postType() == PostType.FEED) {
feedNotificationOrchestrator.notifyFeedLiked(postQueryDto.creatorId(), actorUser.getId(), actorUser.getNickname(), postQueryDto.postId());
}
if (command.postType() == PostType.RECORD || command.postType() == PostType.VOTE) {
roomNotificationOrchestrator.notifyRoomPostLiked(postQueryDto.creatorId(), actorUser.getId(), actorUser.getNickname(), postQueryDto.roomId(), postQueryDto.page(), postQueryDto.postId(), postQueryDto.postType());

switch (command.postType()) {
case FEED ->
feedNotificationOrchestrator.notifyFeedLiked(
postQueryDto.creatorId(), actorUser.getId(), actorUser.getNickname(), postQueryDto.postId()
);
case RECORD, VOTE ->
roomNotificationOrchestrator.notifyRoomPostLiked(
postQueryDto.creatorId(), actorUser.getId(), actorUser.getNickname(), postQueryDto.roomId(), postQueryDto.page(), postQueryDto.postId(), command.postType()
);

}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class RoomPostSearchService implements RoomPostSearchUseCase {
private final RoomPostAccessValidator roomPostAccessValidator;
private final RoomPostQueryMapper roomPostQueryMapper;

private static final int DEFAULT_PAGE_SIZE = 10;
private static final int DEFAULT_PAGE_SIZE = 20;

@Override
@Transactional(readOnly = true)
Expand Down
Loading