Skip to content

Commit

Permalink
Merge pull request #234 from TeamDon-tBe/fix/#233
Browse files Browse the repository at this point in the history
[FIX]테스트를 위해 로직 수정
  • Loading branch information
Hong0329 authored May 27, 2024
2 parents a6f00c1 + 1123266 commit 1148417
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 1148417

Please sign in to comment.