From 4da14a09cf4d9d79ed82e5253ec42bc09be68c59 Mon Sep 17 00:00:00 2001 From: mahyargdz Date: Sun, 4 May 2025 09:12:19 +0330 Subject: [PATCH] update: force --- src/app.module.ts | 6 ++--- .../providers/notifications.service.ts | 25 +++++++++++++++---- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/src/app.module.ts b/src/app.module.ts index 443884e..40d7251 100755 --- a/src/app.module.ts +++ b/src/app.module.ts @@ -7,13 +7,13 @@ import { ConfigModule } from "@nestjs/config"; import { ThrottlerModule } from "@nestjs/throttler"; import { TypeOrmModule } from "@nestjs/typeorm"; import { MailerModule } from "@nestjs-modules/mailer"; -import { TelegrafModule } from "nestjs-telegraf"; +// import { TelegrafModule } from "nestjs-telegraf"; import { bullMqConfig } from "./configs/bullmq.config"; import { cacheConfig } from "./configs/cache.config"; import { mailerConfig } from "./configs/mailer.config"; import { rateLimitConfig } from "./configs/rateLimit.config"; -import { telegrafConfig } from "./configs/telegraf.config"; +// import { telegrafConfig } from "./configs/telegraf.config"; import { databaseConfigs } from "./configs/typeorm.config"; import { HTTPLogger } from "./core/middlewares/logger.middleware"; import { AddressModule } from "./modules/address/address.module"; @@ -43,7 +43,7 @@ import { MonitoringModule } from "./monitoring/monitoring.module"; @Module({ imports: [ - TelegrafModule.forRootAsync(telegrafConfig()), + // TelegrafModule.forRootAsync(telegrafConfig()), MailerModule.forRootAsync(mailerConfig()), BullModule.forRootAsync(bullMqConfig()), ThrottlerModule.forRootAsync(rateLimitConfig()), diff --git a/src/modules/notifications/providers/notifications.service.ts b/src/modules/notifications/providers/notifications.service.ts index 59ac134..eb12a7d 100755 --- a/src/modules/notifications/providers/notifications.service.ts +++ b/src/modules/notifications/providers/notifications.service.ts @@ -169,7 +169,10 @@ export class NotificationsService { await this.smsService.sendAnnouncementSms(data.userPhone, data.title, data.description, dateFormat(data.date)); if (data.userEmail) await this.emailService.sendAnnouncementEmail(data); } - return this.createNotification({ title: NotificationMessage.ANNOUNCEMENT, type: NotifType.ANNOUNCEMENT, message, recipientId }); + return this.createNotification( + { title: NotificationMessage.ANNOUNCEMENT, type: NotifType.ANNOUNCEMENT, message, recipientId }, + queryRunner, + ); } //************************ */ @@ -191,7 +194,10 @@ export class NotificationsService { ); if (data.userEmail) await this.emailService.sendWalletEmail(data); } - return this.createNotification({ title: NotificationMessage.WALLET_CHARGE, type: NotifType.WALLET_CHARGE, message, recipientId }); + return this.createNotification( + { title: NotificationMessage.WALLET_CHARGE, type: NotifType.WALLET_CHARGE, message, recipientId }, + queryRunner, + ); } //************************ */ @@ -214,7 +220,10 @@ export class NotificationsService { ); if (data.userEmail) await this.emailService.sendWalletEmail(data); } - return this.createNotification({ title: NotificationMessage.WALLET_DEDUCTION, type: NotifType.WALLET_DEDUCTION, message, recipientId }); + return this.createNotification( + { title: NotificationMessage.WALLET_DEDUCTION, type: NotifType.WALLET_DEDUCTION, message, recipientId }, + queryRunner, + ); } // //************************ */ @@ -231,7 +240,10 @@ export class NotificationsService { await this.smsService.sendAnswerTicketSms(data.userPhone, data.ticketId, data.subject); if (data.userEmail) await this.emailService.sendTicketEmail(data); } - return this.createNotification({ title: NotificationMessage.ANSWER_TICKET, type: NotifType.ANSWER_TICKET, message, recipientId }); + return this.createNotification( + { title: NotificationMessage.ANSWER_TICKET, type: NotifType.ANSWER_TICKET, message, recipientId }, + queryRunner, + ); } // //************************ */ @@ -248,7 +260,10 @@ export class NotificationsService { await this.smsService.sendCreateTicketSms(data.userPhone, data.ticketId, data.subject, dateFormat(data.date)); if (data.userEmail) await this.emailService.sendTicketEmail(data); } - return this.createNotification({ title: NotificationMessage.CREATE_TICKET, type: NotifType.CREATE_TICKET, message, recipientId }); + return this.createNotification( + { title: NotificationMessage.CREATE_TICKET, type: NotifType.CREATE_TICKET, message, recipientId }, + queryRunner, + ); } //************************ */ async createAssignTicketNotificationForAdmin(recipientId: string, data: ITicketNotificationData, queryRunner: QueryRunner) {