diff --git a/src/main/java/treehouse/server/api/notification/business/NotificationService.java b/src/main/java/treehouse/server/api/notification/business/NotificationService.java index 7fb2de0..a09f8a5 100644 --- a/src/main/java/treehouse/server/api/notification/business/NotificationService.java +++ b/src/main/java/treehouse/server/api/notification/business/NotificationService.java @@ -47,8 +47,9 @@ public void createNotification(User user, Long treehouseId, NotificationRequestD Member sender = memberQueryAdapter.findByUserAndTreehouse(user, treeHouse); Member receiver = memberQueryAdapter.findById(request.getReceiverId()); Notification notification = NotificationMapper.toNotification(sender, receiver, request, reactionName); - - fcmService.sendFcmMessage(receiver.getUser(), notification.getTitle(), notification.getBody()); + if(user.isPushAgree()) { + fcmService.sendFcmMessage(receiver.getUser(), notification.getTitle(), notification.getBody()); + } notificationCommandAdapter.createNotification(notification); }