From 1737319343c25bfb982385c19b3214458e289054 Mon Sep 17 00:00:00 2001 From: abdou6666 Date: Wed, 22 Jan 2025 17:34:16 +0100 Subject: [PATCH] fix: remove duplicate new:user event emitted --- api/src/chat/services/chat.service.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/api/src/chat/services/chat.service.ts b/api/src/chat/services/chat.service.ts index 68cc2c01..5d2b8191 100644 --- a/api/src/chat/services/chat.service.ts +++ b/api/src/chat/services/chat.service.ts @@ -9,7 +9,6 @@ import { Injectable } from '@nestjs/common'; import { EventEmitter2, OnEvent } from '@nestjs/event-emitter'; -import { BotStatsType } from '@/analytics/schemas/bot-stats.schema'; import EventWrapper from '@/channel/lib/EventWrapper'; import { config } from '@/config'; import { HelperService } from '@/helper/helper.service'; @@ -246,12 +245,6 @@ export class ChatService { const subscriberData = await handler.getUserData(event); subscriberData.channel = event.getChannelData(); subscriber = await this.subscriberService.create(subscriberData); - this.eventEmitter.emit( - 'hook:stats:entry', - BotStatsType.new_users, - 'New users', - subscriber, - ); } else { // Already existing user profile // Exec lastvisit hook