Fix self welcome message rendering
This commit is contained in:
@@ -777,13 +777,20 @@
|
||||
container2.querySelectorAll('[data-autosave="1"]').forEach(el => el.remove());
|
||||
}
|
||||
container2.appendChild(div);
|
||||
if (autoScroll) container2.scrollTop = container2.scrollHeight;
|
||||
if (autoScroll) {
|
||||
container2.scrollTop = container2.scrollHeight;
|
||||
}
|
||||
} else {
|
||||
container.appendChild(div);
|
||||
scrollToBottom();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 将消息追加函数暴露到全局,供页面首次加载时回填历史消息使用。
|
||||
*/
|
||||
window.appendMessage = appendMessage;
|
||||
|
||||
// ── WebSocket 初始化 ─────────────────────────────
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
if (typeof window.initChat === 'function') {
|
||||
|
||||
Reference in New Issue
Block a user