Skip to content

Commit c3a01d7

Browse files
committed
fix: ghost thread count query
since when saving thread meta data, participant count excludes author which means thread with 0 participants should be counted as ghost threads instead of single participant
1 parent 0651084 commit c3a01d7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

application/src/main/java/org/togetherjava/tjbot/features/help/HelpThreadStatsCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public void onSlashCommand(SlashCommandInteractionEvent event) {
9797
.filterWhere(
9898
HELP_THREADS.TICKET_STATUS.eq(HelpSystemHelper.TicketStatus.ACTIVE.val))
9999
.as(OPEN_NOW_ALIAS),
100-
count().filterWhere(HELP_THREADS.PARTICIPANTS.eq(1)).as(GHOST_NOW_ALIAS),
100+
count().filterWhere(HELP_THREADS.PARTICIPANTS.eq(0)).as(GHOST_NOW_ALIAS),
101101
avg(HELP_THREADS.PARTICIPANTS).as(AVERAGE_PARTICIPANTS_ALIAS),
102102
avg(HELP_THREADS.MESSAGE_COUNT).as(AVERAGE_MESSAGE_COUNT_ALIAS),
103103
avg(durationInSeconds(HELP_THREADS.CLOSED_AT, HELP_THREADS.CREATED_AT))

0 commit comments

Comments
 (0)