Skip to content

Commit

Permalink
Merge pull request #108 from Team-Shaka/feat/104
Browse files Browse the repository at this point in the history
🐛 Fix: 푸시 알림 동의/거부 여부에 따른 알림 처리 추가
  • Loading branch information
HyoBN authored Aug 27, 2024
2 parents aaf44c8 + 1761b03 commit 4bc923f
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 4bc923f

Please sign in to comment.