diff --git a/static/assets/js/chat.js b/static/assets/js/chat.js
index 8e47fd9..3c66dbf 100644
--- a/static/assets/js/chat.js
+++ b/static/assets/js/chat.js
@@ -306,8 +306,12 @@ function chatLoadChannels() {
chatLoadLastActivity(); // уточнюємо порядок за реальним часом останніх постів
}).catch(function (e) {
console.error(e);
+ var msg = '
'
+ + gettext('Не удалось загрузить каналы') + '
';
var el = document.getElementById('chat-channel-list');
- if (el) el.innerHTML = '' + gettext('Не удалось загрузить каналы') + '
';
+ if (el) el.innerHTML = msg;
+ var dm = document.getElementById('chat-dm-list');
+ if (dm) dm.innerHTML = msg;
});
}
diff --git a/templates/index.html b/templates/index.html
index 0333bdc..857f239 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -907,6 +907,11 @@
if (typeof ttInit === 'function') ttInit();
if (typeof hrPortalInit === 'function') hrPortalInit();
if (typeof empProfileInit === 'function') empProfileInit();
+ // Чат: inline в HTMX-swap часто не выполняется —
+ // без этого списка каналов зависает на «Загрузка…».
+ if (typeof chatInit === 'function' && document.getElementById('chat-config-data')) {
+ chatInit();
+ }
});