Skip to content

Commit

Permalink
fix: remove duplicate new:user event emitted
Browse files Browse the repository at this point in the history
  • Loading branch information
abdou6666 committed Jan 22, 2025
1 parent b9141bc commit 1737319
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions api/src/chat/services/chat.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1737319

Please sign in to comment.