From d64674170ceda402e57d2475ca830a365275a9e5 Mon Sep 17 00:00:00 2001 From: abdou6666 Date: Wed, 15 Jan 2025 18:42:27 +0100 Subject: [PATCH] fix: event returning users missing required payload --- api/src/analytics/services/bot-stats.service.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/api/src/analytics/services/bot-stats.service.ts b/api/src/analytics/services/bot-stats.service.ts index ad12c982..a13ef448 100644 --- a/api/src/analytics/services/bot-stats.service.ts +++ b/api/src/analytics/services/bot-stats.service.ts @@ -75,7 +75,7 @@ export class BotStatsService extends BaseService { if (now - +subscriber.lastvisit > config.analytics.thresholds.loyalty) { this.eventEmitter.emit( 'hook:stats:entry', - 'returning_users', + BotStatsType.returning_users, 'Loyalty', subscriber, ); @@ -85,8 +85,9 @@ export class BotStatsService extends BaseService { if (now - +subscriber.lastvisit > config.analytics.thresholds.returning) { this.eventEmitter.emit( 'hook:stats:entry', - 'returning_users', + BotStatsType.returning_users, 'Returning users', + subscriber, ); } }