feat: email notifications for replies and reactions

This commit is contained in:
Tim
2025-07-30 11:37:40 +08:00
parent 69f5745fe8
commit 3464137511
5 changed files with 112 additions and 6 deletions

View File

@@ -32,4 +32,7 @@ public interface ReactionRepository extends JpaRepository<Reaction, Long> {
@Query("SELECT COUNT(r) FROM Reaction r WHERE r.type = com.openisle.model.ReactionType.LIKE AND ((r.post IS NOT NULL AND r.post.author.username = :username) OR (r.comment IS NOT NULL AND r.comment.author.username = :username))")
long countLikesReceived(@Param("username") String username);
@Query("SELECT COUNT(r) FROM Reaction r WHERE (r.post IS NOT NULL AND r.post.author.username = :username) OR (r.comment IS NOT NULL AND r.comment.author.username = :username)")
long countReceived(@Param("username") String username);
}