/opt/mawid/apps/api/src/whatsapp
NameSizeModeActions
owner-notifier.service.ts17450644editdlrm
wa-core.module.ts13520644editdlrm
wa-http.client.ts17360644editdlrm
wa-inbound.service.spec.ts50660644editdlrm
wa-inbound.service.ts54310644editdlrm
wa-outbound.worker.ts27230644editdlrm
wa-queue.ts4470644editdlrm
wa-sender.service.ts49590644editdlrm
wa-signature.spec.ts12640644editdlrm
wa-signature.ts6620644editdlrm
wa-types.ts16830644editdlrm
wa-webhook.controller.spec.ts26840644editdlrm
wa-webhook.controller.ts23080644editdlrm
wa-window.spec.ts8600644editdlrm
wa-window.ts5090644editdlrm
whatsapp.module.ts5790644editdlrm
Edit: /opt/mawid/apps/api/src/whatsapp/wa-window.ts (509B)
export const CUSTOMER_SERVICE_WINDOW_MS = 24 * 60 * 60 * 1000; /** * Meta's 24-hour customer service window: free-form messages are allowed only * within 24h of the patient's last inbound message; outside it, only approved * template messages may be sent. */ export function isWithinCustomerServiceWindow( lastInboundAt: Date | null | undefined, now: Date = new Date(), ): boolean { if (!lastInboundAt) return false; return now.getTime() - lastInboundAt.getTime() < CUSTOMER_SERVICE_WINDOW_MS; }