mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-23 14:40:49 +08:00
Delete notifications when posts or comments are removed
This commit is contained in:
@@ -143,7 +143,7 @@ public class CommentService {
|
||||
}
|
||||
reactionRepository.findByComment(comment).forEach(reactionRepository::delete);
|
||||
commentSubscriptionRepository.findByComment(comment).forEach(commentSubscriptionRepository::delete);
|
||||
notificationRepository.findByComment(comment).forEach(n -> { n.setComment(null); notificationRepository.save(n); });
|
||||
notificationRepository.deleteAll(notificationRepository.findByComment(comment));
|
||||
commentRepository.delete(comment);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user