Skip to content

Commit

Permalink
fix: 중복 댓글 else-if 처리
Browse files Browse the repository at this point in the history
  • Loading branch information
char-yb committed Oct 15, 2024
1 parent 350d7b1 commit 41ecda6
Showing 1 changed file with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,20 +105,19 @@ private void sendCommentNotification(
// 부모 댓글 작성자
Member parentCommentWriter = comment.getParent().getWriter();

// 부모 댓글 작성자가 대댓글 작성자가 아닌 경우에만 알림 전송
if (!parentCommentWriter.equals(commentWriter)) {
// 게시물 작성자에게는 RECORD_RE_COMMENT 알림
if (!missionRecordOwner.equals(commentWriter)) {
sendCommentNotification(
parentCommentWriter,
FcmNotificationConstants.RE_COMMENT,
missionRecordOwner,
FcmNotificationConstants.RECORD_RE_COMMENT,
missionRecord,
comment,
commentWriter);
}
if (!missionRecordOwner.equals(commentWriter)) {
// 게시물 작성자에게는 RECORD_RE_COMMENT 알림
} else if (!parentCommentWriter.equals(commentWriter)) {
// 부모 댓글 작성자가 대댓글 작성자가 아닌 경우에만 알림 전송
sendCommentNotification(
missionRecordOwner,
FcmNotificationConstants.RECORD_RE_COMMENT,
parentCommentWriter,
FcmNotificationConstants.RE_COMMENT,
missionRecord,
comment,
commentWriter);
Expand Down

0 comments on commit 41ecda6

Please sign in to comment.