Skip to content

Commit

Permalink
fix don't emit chat_member update to questions
Browse files Browse the repository at this point in the history
  • Loading branch information
cyri113 committed Oct 15, 2024
1 parent e096039 commit 29102db
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/bot/src/bot.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ export class BotService implements OnModuleInit {
this.logger.log(`Received ${event} from ${ctx.chat.id}`);
this.eventClient.emit(event, ctx);
this.graphClient.emit(event, ctx);
if (!ctx.update.message.from.is_bot) {
if (
event != UpdateEvent.CHAT_MEMBER &&
!ctx.update.message.from?.is_bot
) {
this.tgQuestionClient.emit(event, ctx);
}
return;
Expand Down

0 comments on commit 29102db

Please sign in to comment.