From 69369965400401bca12ef8f1303885ec1e3c8aec Mon Sep 17 00:00:00 2001 From: Marius Obert Date: Mon, 14 Oct 2024 12:10:48 +0200 Subject: [PATCH] add missing check --- src/lib/templates.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/templates.ts b/src/lib/templates.ts index 64cf9a1..ea8c66c 100644 --- a/src/lib/templates.ts +++ b/src/lib/templates.ts @@ -196,7 +196,10 @@ export async function getReadyToOrderMessage( contentVariables[key] = value; }); - const templateName = `${SERVICE_INSTANCE_PREFIX.toLowerCase()}_ready_to_order_${availableOptions.length}`; + + const limitess = maxNumberOrders >= 50 ? "_limitless" : ""; + + const templateName = `${SERVICE_INSTANCE_PREFIX.toLowerCase()}_ready_to_order${limitess}_${availableOptions.length}`; const template = templates.find((t) => t.friendly_name === templateName); if (!template) {