From e5b63dbb6a805348c9199c3dc00ad41a32e1a110 Mon Sep 17 00:00:00 2001 From: yetmgeta Date: Mon, 25 Aug 2025 22:38:22 +0300 Subject: [PATCH] removed white spaces from recepient --- api/src/gateway/gateway.service.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/api/src/gateway/gateway.service.ts b/api/src/gateway/gateway.service.ts index 33ec036..12e35bb 100644 --- a/api/src/gateway/gateway.service.ts +++ b/api/src/gateway/gateway.service.ts @@ -171,7 +171,8 @@ export class GatewayService { const fcmMessages: Message[] = [] - for (const recipient of recipients) { + for (let recipient of recipients) { + recipient = recipient.replace(/\s+/g, "") const sms = await this.smsModel.create({ device: device._id, smsBatch: smsBatch._id, @@ -366,13 +367,14 @@ export class GatewayService { continue } - for (const recipient of recipients) { + for (let recipient of recipients) { + recipient = recipient.replace(/\s+/g, "") const sms = await this.smsModel.create({ device: device._id, smsBatch: smsBatch._id, message: message, type: SMSType.SENT, - recipient, +recipient, requestedAt: new Date(), status: 'pending', })