Skip to content

Commit af15937

Browse files
committed
refactor: 댓글 작성 알림 메시지에 게시글 제목 추가
1 parent 13f2106 commit af15937

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/com/back/domain/post/comment/service/CommentService.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,12 @@ public CommentResponseDto createComment(Long postId, CommentCreateRequestDto req
4747
.build();
4848

4949
// 게시글 작성자에게 알림 전송
50+
String commentMessage = String.format("%s 님이 '%s' 게시글에 댓글을 남겼습니다.", user.getNickname(), post.getTitle());
5051
notificationService.sendNotification(
5152
post.getUser(),
5253
post,
5354
NotificationType.COMMENT,
54-
user.getNickname() + " 님이 댓글을 남겼습니다."
55+
commentMessage
5556
);
5657

5758
Comment saved = commentRepository.save(comment);

0 commit comments

Comments
 (0)