diff --git a/src/commands/send/create.command.ts b/src/commands/send/create.command.ts index 365a97ffea..bbf0adc65a 100644 --- a/src/commands/send/create.command.ts +++ b/src/commands/send/create.command.ts @@ -31,6 +31,8 @@ export class SendCreateCommand { if (typeof requestJson !== "string") { req = requestJson; + req.deletionDate = req.deletionDate == null ? null : new Date(req.deletionDate); + req.expirationDate = req.expirationDate == null ? null : new Date(req.expirationDate); } else { try { const reqJson = Buffer.from(requestJson, "base64").toString(); diff --git a/src/commands/send/edit.command.ts b/src/commands/send/edit.command.ts index 777d5674d1..4aac124079 100644 --- a/src/commands/send/edit.command.ts +++ b/src/commands/send/edit.command.ts @@ -27,6 +27,8 @@ export class SendEditCommand { let req: SendResponse = null; if (typeof requestJson !== "string") { req = requestJson; + req.deletionDate = req.deletionDate == null ? null : new Date(req.deletionDate); + req.expirationDate = req.expirationDate == null ? null : new Date(req.expirationDate); } else { try { const reqJson = Buffer.from(requestJson, "base64").toString();