Skip to content

Commit

Permalink
[FIX]테스트를 위해 로직 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Hong0329 committed May 27, 2024
1 parent a6f00c1 commit 1123266
Showing 1 changed file with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,29 +113,29 @@ public void likeContent(Long memberId, Long contentId, ContentLikedRequestDto co
.notificationText("")
.build();
Notification savedNotification = notificationRepository.save(notification);
}

if (Boolean.TRUE.equals(targetMember.getIsPushAlarmAllowed())) {
String FcmMessageTitle = triggerMember.getNickname() + "님이 " + targetMember.getNickname() + "님의 글을 좋아합니다.";

FcmMessageDto contentLikeFcmMessage = FcmMessageDto.builder()
.validateOnly(false)
.message(FcmMessageDto.Message.builder()
.notificationDetails(FcmMessageDto.NotificationDetails.builder()
.title(FcmMessageTitle)
.body("")
.build())
.token(targetMember.getFcmToken())
.data(FcmMessageDto.Data.builder()
.name("contentLike")
.description("게시글 좋아요 푸시 알림")
.relateContentId(String.valueOf(contentId))
.build())
.build())
.build();

fcmService.sendMessage(contentLikeFcmMessage);

if (Boolean.TRUE.equals(targetMember.getIsPushAlarmAllowed())) {
String FcmMessageTitle = triggerMember.getNickname() + "님이 " + targetMember.getNickname() + "님의 글을 좋아합니다.";

FcmMessageDto contentLikeFcmMessage = FcmMessageDto.builder()
.validateOnly(false)
.message(FcmMessageDto.Message.builder()
.notificationDetails(FcmMessageDto.NotificationDetails.builder()
.title(FcmMessageTitle)
.body("")
.build())
.token(targetMember.getFcmToken())
.data(FcmMessageDto.Data.builder()
.name("contentLike")
.description("게시글 좋아요 푸시 알림")
.relateContentId(String.valueOf(contentId))
.build())
.build())
.build();

fcmService.sendMessage(contentLikeFcmMessage);
}
}
}

Expand Down

0 comments on commit 1123266

Please sign in to comment.