From c1cc470eca4262ee6ef10a08c0c07fc3d7a5bbb6 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 24 Nov 2023 14:30:06 +0300 Subject: ActivityPub: count public posts only --- src/main/java/com/juick/service/InfoService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java') diff --git a/src/main/java/com/juick/service/InfoService.java b/src/main/java/com/juick/service/InfoService.java index fbf75b86..b10e325e 100644 --- a/src/main/java/com/juick/service/InfoService.java +++ b/src/main/java/com/juick/service/InfoService.java @@ -63,7 +63,7 @@ public class InfoService { Integer.class, ZonedDateTime.now().minus(6, ChronoUnit.MONTHS).toLocalDateTime())); Usage usage = new Usage(); usage.setUsers(userStats); - usage.setLocalPosts(jdbcTemplate.queryForObject("SELECT COUNT(*) FROM messages", + usage.setLocalPosts(jdbcTemplate.queryForObject("SELECT COUNT(*) FROM messages WHERE privacy=1", Integer.class)); usage.setLocalComments(jdbcTemplate.queryForObject("SELECT COUNT(*) FROM replies WHERE reply_uri IS NULL", Integer.class)); -- cgit v1.2.3