Update conversations.php

This commit is contained in:
Lizandro Guarnizo
2026-01-27 00:30:47 -05:00
parent 986a60d662
commit 7bcb595b18
+14
View File
@@ -1948,6 +1948,20 @@
if (nearBottomNow && !this._userScrolling) this.scrollToBottom();
}
// If we received any delta messages, perform an immediate full fetch to sync any server-side batching
if (messages.length > 0) {
if (!this._fullLoadInProgress) {
try {
if (console && console.debug) console.debug('pollNewMessages: delta returned, triggering immediate full reload');
await this.loadMessages(this.currentUserId, true, nearBottomNow && !this._userScrolling);
} catch (e) {
console.warn('Immediate full reload after delta failed', e);
}
} else {
if (console && console.debug) console.debug('Immediate full reload skipped because another full load is in progress');
}
}
// update latest timestamp from the last message
try {
const last = messages[messages.length - 1];