diff --git a/conversations.php b/conversations.php index 6286889..c53cb50 100644 --- a/conversations.php +++ b/conversations.php @@ -1534,9 +1534,11 @@ }, 30000); // Actualizar mensajes del chat activo cada 10 segundos + // Use incremental load (initial=false) to avoid forcing scroll to bottom while the user reads setInterval(() => { if (this.currentUserId) { - this.loadconversations(this.currentUserId, false); + // loadMessages with initial=false fetches older/newer messages without forcing a scroll + this.loadMessages(this.currentUserId, false).catch(err => console.warn('Periodic loadMessages failed', err)); } }, 10000); }