Skip to content

Commit

Permalink
fcm lock
Browse files Browse the repository at this point in the history
  • Loading branch information
mjh000526 committed Jun 24, 2024
1 parent 1e3f765 commit c72dede
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,6 @@ public Long getAccessTokenOfMemberId(HttpServletRequest request) {
public void getMessage() throws FirebaseMessagingException {

System.out.println(fcmToken);
fcmService.sendMessageByToken("title","body",fcmToken);
// fcmService.sendMessageByToken("title","body",fcmToken);
}
}
8 changes: 4 additions & 4 deletions src/main/java/com/example/just/Service/CommentService.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ public Comment createComment(Long postId, Long member_id, CommentDto commentDto)
.build()
);
//부모댓글의 작성자에게 알림 전송
fcmService.sendMessageByToken("댓글 알림","누군가가 댓글에 대댓글을 작성했어요! \""
+ commentDto.getComment_content() + "\"",parentComment.getMember().getFcmToken());
// fcmService.sendMessageByToken("댓글 알림","누군가가 댓글에 대댓글을 작성했어요! \""
// + commentDto.getComment_content() + "\"",parentComment.getMember().getFcmToken());
}
} else if (parentComment == null) { //아닐경우는 부모댓글
PostDocument postDocument = postContentESRespository.findById(postId).get();
Expand All @@ -136,8 +136,8 @@ public Comment createComment(Long postId, Long member_id, CommentDto commentDto)
.build()
);
//게시글의 작성자에게 알림 발송
fcmService.sendMessageByToken("댓글 알림","누군가가 게시글에 댓글을 작성했어요! \""
+ commentDto.getComment_content() + "\"",receiver.get().getFcmToken());
// fcmService.sendMessageByToken("댓글 알림","누군가가 게시글에 댓글을 작성했어요! \""
// + commentDto.getComment_content() + "\"",receiver.get().getFcmToken());
}
}
//댓글 테이블에 저장
Expand Down

0 comments on commit c72dede

Please sign in to comment.