feat(backend): trigger reply notifications from CommentService

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-03-27 20:05:29 +01:00
parent 420f50b6d5
commit bc62f3b0af
2 changed files with 25 additions and 1 deletions

View File

@@ -17,6 +17,7 @@ import java.util.UUID;
public class CommentService {
private final CommentRepository commentRepository;
private final NotificationService notificationService;
public List<DocumentComment> getCommentsForDocument(UUID documentId) {
List<DocumentComment> roots =
@@ -60,7 +61,9 @@ public class CommentService {
.authorId(author.getId())
.authorName(resolveAuthorName(author))
.build();
return commentRepository.save(reply);
DocumentComment saved = commentRepository.save(reply);
notificationService.notifyReply(saved, root);
return saved;
}
@Transactional