@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({ content_sid: contentSid, numero: await resolveThreadCode(ensureWhatsAppFormat(code)) }, { limit: 1 });
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peopl-health/nexus",
3
- "version": "6.0.26",
3
+ "version": "6.0.27",
4
4
  "description": "Core messaging and assistant library for WhatsApp communication platforms",
5
5
  "keywords": [
6
6
  "whatsapp",