Skip to content

Commit bc5faf1

Browse files
Added attachment parsing to the xlsx parser
1 parent 34b2cfb commit bc5faf1

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

api/pkg/validators/bulk_message_handler_validator.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,17 @@ func (v *BulkMessageHandlerValidator) parseXlsx(ctxLogger telemetry.Logger, user
143143
}
144144
}
145145

146+
var attachmentURLs string
147+
if len(row) > 4 && strings.TrimSpace(row[4]) != "" {
148+
attachmentURLs = strings.TrimSpace(row[4])
149+
}
150+
146151
messages = append(messages, &requests.BulkMessage{
147152
FromPhoneNumber: strings.TrimSpace(row[0]),
148153
ToPhoneNumber: strings.TrimSpace(row[1]),
149154
Content: row[2],
150155
SendTime: sendAt,
156+
AttachmentURLs: attachmentURLs,
151157
})
152158
}
153159

0 commit comments

Comments
 (0)