Skip to content

Commit b6b0555

Browse files
authored
feat: 알림 삭제에도 사일런트 푸쉬 추가 (#144)
1 parent de82e3e commit b6b0555

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/main/java/org/devkor/apu/saerok_server/domain/notification/application/NotificationCommandService.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,14 @@ public void deleteNotification(Long userId, Long notificationId) {
5252
}
5353

5454
notificationRepository.remove(notification);
55+
56+
pushGateway.sendSilentBadgeUpdate(userId, notificationRepository.countUnreadByUserId(userId).intValue());
5557
}
5658

5759
public void deleteAllNotifications(Long userId) {
5860
userRepository.findById(userId).orElseThrow(() -> new NotFoundException("존재하지 않는 사용자 id예요"));
5961
notificationRepository.deleteByUserId(userId);
62+
63+
pushGateway.sendSilentBadgeUpdate(userId, notificationRepository.countUnreadByUserId(userId).intValue());
6064
}
6165
}

0 commit comments

Comments
 (0)