From 8406cc72793ad6ad0cc9250f678f734659cbf1ad Mon Sep 17 00:00:00 2001 From: Mayur Virendra Date: Tue, 9 Apr 2024 16:21:23 +0530 Subject: [PATCH] added check for timestamp --- services/AI.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/services/AI.js b/services/AI.js index b0ef0f1..2d6f50b 100644 --- a/services/AI.js +++ b/services/AI.js @@ -335,6 +335,13 @@ class AI { else delete responseMessage.intent.fulfillment.stops[0].location.polygon; } + if(this.action?.action=='search' && responseMessage?.intent?.fulfillment?.stops && responseMessage?.intent?.fulfillment?.stops.length>0){ + responseMessage?.intent?.fulfillment?.stops.map(stop=>{ + if(stop?.time?.timestamp){ + stop.time.timestamp = new Date('2024-04-12T12:00:00Z').toISOString(); + } + }) + } return responseMessage }