fix commentcount

This commit is contained in:
_Bastler 2021-10-06 19:04:14 +02:00
parent cdcdb64d60
commit 33ace4db2a

View File

@ -99,7 +99,8 @@ public class CommentManager {
return count(target);
}
return commentRepository.count(qComment.target.eq(target).and(qComment.parent.eq(parent)));
return commentRepository.count(qComment.target.eq(target).and(qComment.parent.eq(parent))
.and(qComment.created.before(Instant.now())));
}
/**
@ -109,7 +110,8 @@ public class CommentManager {
* @return the long
*/
public Long count(Long target) {
return commentRepository.count(qComment.target.eq(target));
return commentRepository
.count(qComment.target.eq(target).and(qComment.created.before(Instant.now())));
}
/**