Update conversations.php

This commit is contained in:
Lizandro Guarnizo
2026-01-24 08:55:45 -05:00
parent 0900b9e63e
commit 0a4ffc6837
+9
View File
@@ -2113,6 +2113,15 @@
messages = data;
}
// Guard: cuando paginamos (initial=false) y la respuesta no trae mensajes,
// no reemplazar ni limpiar la conversación actual; solo indicar que no hay más.
if (!initial && Array.isArray(messages) && messages.length === 0) {
try { if (topLoader && topLoader.parentNode) topLoader.remove(); } catch(e) {}
this.hasMoreMessages = false;
// preserve current view and stop further processing
return;
}
if (initial) {
this.conversations = messages;
} else {