Browse Source

Merge e5b63dbb6a into 183dbeb29a

pull/127/merge
Yetmgeta Ewunetu 6 months ago
committed by GitHub
parent
commit
52a44583c2
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 8
      api/src/gateway/gateway.service.ts

8
api/src/gateway/gateway.service.ts

@ -171,7 +171,8 @@ export class GatewayService {
const fcmMessages: Message[] = [] const fcmMessages: Message[] = []
for (const recipient of recipients) {
for (let recipient of recipients) {
recipient = recipient.replace(/\s+/g, "")
const sms = await this.smsModel.create({ const sms = await this.smsModel.create({
device: device._id, device: device._id,
smsBatch: smsBatch._id, smsBatch: smsBatch._id,
@ -366,13 +367,14 @@ export class GatewayService {
continue continue
} }
for (const recipient of recipients) {
for (let recipient of recipients) {
recipient = recipient.replace(/\s+/g, "")
const sms = await this.smsModel.create({ const sms = await this.smsModel.create({
device: device._id, device: device._id,
smsBatch: smsBatch._id, smsBatch: smsBatch._id,
message: message, message: message,
type: SMSType.SENT, type: SMSType.SENT,
recipient,
recipient,
requestedAt: new Date(), requestedAt: new Date(),
status: 'pending', status: 'pending',
}) })

Loading…
Cancel
Save