@peopl-health/nexus 6.0.26 → 6.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -306,7 +306,10 @@ const checkMessageStatusController = async (req, res) => {
|
|
|
306
306
|
}
|
|
307
307
|
|
|
308
308
|
try {
|
|
309
|
-
const [msg] = await getMessages(
|
|
309
|
+
const [msg] = await getMessages(
|
|
310
|
+
{ content_sid: contentSid, numero: await resolveThreadCode(ensureWhatsAppFormat(code)) },
|
|
311
|
+
{ sort: { createdAt: -1 }, limit: 1 }
|
|
312
|
+
);
|
|
310
313
|
if (!msg) {
|
|
311
314
|
return res.status(404).json({ success: false, error: 'Message not found' });
|
|
312
315
|
}
|