-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEAT] Fcm 푸시 알림 서비스 구현 #216
Conversation
if(targetMember.isPushAlarmAllowed()) { | ||
String FcmMessageTitle = triggerMember.getNickname() + "님이" + targetMember.getNickname() + "님의 답글을 좋아합니다."; | ||
|
||
FcmMessageDto commentFcmMessage = FcmMessageDto.builder() | ||
.validateOnly(false) | ||
.message(FcmMessageDto.Message.builder() | ||
.notificationDetails(FcmMessageDto.NotificationDetails.builder() | ||
.title(FcmMessageTitle) | ||
.body("") | ||
.build()) | ||
.token(targetMember.getFcmToken()) | ||
.data(FcmMessageDto.Data.builder() | ||
.name("commentLike") | ||
.description("답글 좋아요 푸시 알림") | ||
.relateContentId(contentId) | ||
.build()) | ||
.build()) | ||
.build(); | ||
|
||
fcmService.sendMessage(commentFcmMessage); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
어우..빌드업이 좋네요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
엇 이 리뷰를 통해서 제가 실수한 부분을 찾았습니다...ㅋㅋㅋㅋ수정해서 커밋하겠습니다. 감사합니다! 복붙해서 썻더니 다른 곳도 commentFcmMessage로 명명해놨네요.. 머쓱
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ㅋㅋㅋㅋㅋ오! 전혀 몰랐는데 예리했던척 성공~
완성한 코드도 다시보는 리드? ㄷㄷ 폼미쳤다
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다!!! 한가지 궁금한점은 명세서에 isPushAlarmAllowed가 null인경우도 있더라구요?! 처음 회원가입하게되면 우선 null로 처리한 다음 응답여부에 따라 true/false로 바뀌는 로직인지 궁금합니다!
맞습니다!! 클라 측에서 푸시알림 수신 동의 여부를 회원가입이 끝난 후에 선택하기 때문에 일단은 null로 설정했습니다. |
📣 Related Issue
📝 Summary
🙏 Question & PR point
📬 Postman