From 0a4ffc6837e00ec80c1a9edf4c7268c3b55c301d Mon Sep 17 00:00:00 2001 From: Lizandro Guarnizo <77708265+lizandrogd@users.noreply.github.com> Date: Sat, 24 Jan 2026 08:55:45 -0500 Subject: [PATCH] Update conversations.php --- conversations.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/conversations.php b/conversations.php index 4b52f0a..66ef728 100644 --- a/conversations.php +++ b/conversations.php @@ -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 {