From ae90a8646e99745812fe2a483227f888604153d4 Mon Sep 17 00:00:00 2001
From: Jean-Baptiste Pasquier <contact@jbpasquier.eu>
Date: Thu, 8 Oct 2020 13:58:22 +0000
Subject: [PATCH] feature: handle other errors on disconnection

---
 src/solid-xmpp-chat.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/solid-xmpp-chat.js b/src/solid-xmpp-chat.js
index 85dd950..c3c8dea 100644
--- a/src/solid-xmpp-chat.js
+++ b/src/solid-xmpp-chat.js
@@ -156,6 +156,10 @@ export const SolidXMPPChat = {
             Array.from(document.querySelectorAll('solid-xmpp-chat')).map(el => el.shadowRoot.innerHTML = 
               `<div style='margin:3em;line-height:32px;'><b style='color:red;'>Erreur d'authentification.</b><br /><i style='color:grey;'>Êtes-vous sur le Hubl affilié à votre compte ?</i></div>`
             );
+          } else {
+            Array.from(document.querySelectorAll('solid-xmpp-chat')).map(el => el.shadowRoot.innerHTML = 
+              `<div style='margin:3em;line-height:32px;'><b style='color:red;'>Erreur.</b><br /><i style='color:grey;'>${this._converse.connfeedback.attributes.message}</i></div>`
+            );
           }
         });
       }
-- 
GitLab