Merge pull request #574 from Hexastack/fix/event-missing-payload

fix: event returning users missing required payload
This commit is contained in:
Med Marrouchi 2025-01-17 17:44:09 +01:00 committed by GitHub
commit 7cf87607e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -75,7 +75,7 @@ export class BotStatsService extends BaseService<BotStats> {
if (now - +subscriber.lastvisit > config.analytics.thresholds.loyalty) { if (now - +subscriber.lastvisit > config.analytics.thresholds.loyalty) {
this.eventEmitter.emit( this.eventEmitter.emit(
'hook:stats:entry', 'hook:stats:entry',
'returning_users', BotStatsType.returning_users,
'Loyalty', 'Loyalty',
subscriber, subscriber,
); );
@ -85,8 +85,9 @@ export class BotStatsService extends BaseService<BotStats> {
if (now - +subscriber.lastvisit > config.analytics.thresholds.returning) { if (now - +subscriber.lastvisit > config.analytics.thresholds.returning) {
this.eventEmitter.emit( this.eventEmitter.emit(
'hook:stats:entry', 'hook:stats:entry',
'returning_users', BotStatsType.returning_users,
'Returning users', 'Returning users',
subscriber,
); );
} }
} }