From 64f9ff752a83452787b94bffc6c60401429d26dd Mon Sep 17 00:00:00 2001 From: John Livingston Date: Thu, 4 Apr 2024 17:02:21 +0200 Subject: [PATCH] Fix error messages. --- client/utils/conversejs.ts | 2 +- client/videowatch-client-plugin.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/client/utils/conversejs.ts b/client/utils/conversejs.ts index 2304a4db..b6588e55 100644 --- a/client/utils/conversejs.ts +++ b/client/utils/conversejs.ts @@ -160,7 +160,7 @@ async function displayConverseJS ( const converseJSParams: InitConverseJSParams = await (response).json() await loadConverseJS(converseJSParams) - window.initConverse(converseJSParams, chatIncludeMode, authHeader ?? null) + await window.initConverse(converseJSParams, chatIncludeMode, authHeader ?? null) } export { diff --git a/client/videowatch-client-plugin.ts b/client/videowatch-client-plugin.ts index ea88efb1..e84d26a2 100644 --- a/client/videowatch-client-plugin.ts +++ b/client/videowatch-client-plugin.ts @@ -220,6 +220,10 @@ function register (registerOptions: RegisterClientOptions): void { message.classList.add('peertube-plugin-livechat-error-message') message.innerText = await peertubeHelpers.translate(LOC_CHATROOM_NOT_ACCESSIBLE) container.append(message) + + container.querySelectorAll( + '.livechat-spinner, converse-root' + ).forEach(dom => dom.remove()) } hackStyles(false)