Skip to content

Commit 4bc923f

Browse files
authored
Merge pull request #108 from Team-Shaka/feat/104
🐛 Fix: 푸시 알림 동의/거부 여부에 따른 알림 처리 추가
2 parents aaf44c8 + 1761b03 commit 4bc923f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/treehouse/server/api/notification/business/NotificationService.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@ public void createNotification(User user, Long treehouseId, NotificationRequestD
4747
Member sender = memberQueryAdapter.findByUserAndTreehouse(user, treeHouse);
4848
Member receiver = memberQueryAdapter.findById(request.getReceiverId());
4949
Notification notification = NotificationMapper.toNotification(sender, receiver, request, reactionName);
50-
51-
fcmService.sendFcmMessage(receiver.getUser(), notification.getTitle(), notification.getBody());
50+
if(user.isPushAgree()) {
51+
fcmService.sendFcmMessage(receiver.getUser(), notification.getTitle(), notification.getBody());
52+
}
5253
notificationCommandAdapter.createNotification(notification);
5354
}
5455

0 commit comments

Comments
 (0)