diff --git a/src/messaging/messaging.service.ts b/src/messaging/messaging.service.ts index 2e68e0e..8101e82 100644 --- a/src/messaging/messaging.service.ts +++ b/src/messaging/messaging.service.ts @@ -231,7 +231,7 @@ ${callerContext ? `\n${callerContext}` : ''}`; if (!deptDocs.length) return { sent: false, message: `No doctors found in ${department}.` }; const sections: ListSection[] = [{ - title: department, + title: department.substring(0, 24), rows: deptDocs.slice(0, 10).map((d: any) => { const docName = `Dr. ${d.fullName?.firstName ?? ''} ${d.fullName?.lastName ?? ''}`.trim(); const fee = d.consultationFeeNew?.amountMicros @@ -299,11 +299,11 @@ ${callerContext ? `\n${callerContext}` : ''}`; } const sections: ListSection[] = [{ - title: `${doctorName} — ${targetDate}`, + title: targetDate, // section title max 24 chars rows: timeSlots.map((s) => ({ id: `slot:${doctorId}:${targetDate}T${s.time}:00`, - title: s.time, - description: s.clinic, + title: s.time, // row title max 24 chars + description: s.clinic || undefined, })), }]; await provider.sendList(phone, `Available slots for ${doctorName}:`, 'View Slots', sections); diff --git a/src/messaging/providers/gupshup.provider.ts b/src/messaging/providers/gupshup.provider.ts index a8020ac..279887a 100644 --- a/src/messaging/providers/gupshup.provider.ts +++ b/src/messaging/providers/gupshup.provider.ts @@ -123,7 +123,7 @@ export class GupshupProvider extends MessagingProvider { params.append('message', message); params.append('src.name', this.appId); - this.logger.log(`[GUPSHUP] Sending to ${to}: ${message.substring(0, 100)}...`); + this.logger.log(`[GUPSHUP] Sending to ${to}: ${message.substring(0, 500)}`); const resp = await fetch(this.apiUrl, { method: 'POST',